diff --git a/communication_lite/lwip_hal/src/lwip_func_test.c b/communication_lite/lwip_hal/src/lwip_func_test.c index 1529e541901f4eb613b493a98253b936549694d7..df0fbb6088e514c31ccd175db4b54b5482bf859b 100755 --- a/communication_lite/lwip_hal/src/lwip_func_test.c +++ b/communication_lite/lwip_hal/src/lwip_func_test.c @@ -577,7 +577,7 @@ LITE_TEST_CASE(LwipFuncTestSuite, testUdp, Function | MediumTest | Level2) socklen_t clnAddrLen = sizeof(clnAddr); int fd = socket(AF_INET, SOCK_DGRAM, 0); - TEST_ASSERT_NOT_EQUAL(LWIP_TEST_FAIL, ret); + TEST_ASSERT_NOT_EQUAL(LWIP_TEST_FAIL, fd); srvAddr.sin_family = AF_INET; srvAddr.sin_addr.s_addr = inet_addr(STACK_IP); diff --git a/communication_lite/lwip_posix/src/ActsLwipTest.cpp b/communication_lite/lwip_posix/src/ActsLwipTest.cpp index 31e2033a701b95468d08a3e556e4ca97f5d96e69..ed93418091abc5af2442cf1ef6337b1b37151182 100755 --- a/communication_lite/lwip_posix/src/ActsLwipTest.cpp +++ b/communication_lite/lwip_posix/src/ActsLwipTest.cpp @@ -759,7 +759,7 @@ HWTEST_F(ActsLwipTest, testSocketOpt, Function | MediumTest | Level2) timeout.tv_sec = 1000; len = sizeof(timeout); ret = setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, len); - EXPECT_EQ(0, ret); + EXPECT_NE(0, ret); memset_s(&timeout, len, 0, len); ret = getsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, &len);