From fa68ebfcd14e9972fac65740045c6403242bfe98 Mon Sep 17 00:00:00 2001 From: zhangdengyu Date: Wed, 19 Apr 2023 10:39:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 方案描述: musl升级修改了接口部分场景下的错误码,测试用例同步修改。 BREAKING CHANGE: 修复测试用例对外变更描述: 1、socket接口v1.2.0中传入错误参数返回EINVAL错误码,更新之后将返回ENOENT错误码; 2、__nscd_query接口v1.2.0中给传入错误参数返回EAFNOSUPPORT错误码,更新之后将返回ENOENT错误码。 Close: #I6WWES Signed-off-by: zhangdengyu Change-Id: Ib8a1e52b164cf78df917dc28c90f02056a80e1ed --- testsuites/unittest/libc/sys/full/sys_test_025.cpp | 8 ++++---- testsuites/unittest/net/netdb/full/net_netdb_test_004.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/testsuites/unittest/libc/sys/full/sys_test_025.cpp b/testsuites/unittest/libc/sys/full/sys_test_025.cpp index 95ea0554..db6d678b 100644 --- a/testsuites/unittest/libc/sys/full/sys_test_025.cpp +++ b/testsuites/unittest/libc/sys/full/sys_test_025.cpp @@ -85,22 +85,22 @@ STATIC INT32 TestCase1(void) INT32 ret = getgrgid_r(-1, &getNam1, buf, len, &getNam2); ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret); - ICUNIT_ASSERT_EQUAL(errno, EAFNOSUPPORT, errno); + ICUNIT_ASSERT_EQUAL(errno, ENOENT, errno); errno = 0; groupRet = getgrgid(-1); ICUNIT_ASSERT_EQUAL(groupRet, 0, groupRet); - ICUNIT_ASSERT_EQUAL(errno, EAFNOSUPPORT, errno); + ICUNIT_ASSERT_EQUAL(errno, ENOENT, errno); errno = 0; groupRet = getgrnam("null"); ICUNIT_ASSERT_EQUAL(groupRet, nullptr, groupRet); - ICUNIT_ASSERT_EQUAL(errno, EAFNOSUPPORT, errno); + ICUNIT_ASSERT_EQUAL(errno, ENOENT, errno); errno = 0; ret = getgrnam_r("null", &getData1, buf, len, &getData2); ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret); - ICUNIT_ASSERT_EQUAL(errno, EAFNOSUPPORT, errno); + ICUNIT_ASSERT_EQUAL(errno, ENOENT, errno); errno = 0; return 0; diff --git a/testsuites/unittest/net/netdb/full/net_netdb_test_004.cpp b/testsuites/unittest/net/netdb/full/net_netdb_test_004.cpp index 8d253ce8..c05a6fb7 100644 --- a/testsuites/unittest/net/netdb/full/net_netdb_test_004.cpp +++ b/testsuites/unittest/net/netdb/full/net_netdb_test_004.cpp @@ -63,7 +63,7 @@ static int GetHostByAddrTest(void) errno = 0; ia.s_addr = inet_addr("127.0.0.0"); addr = gethostbyaddr(&ia, sizeof ia, AF_INET); - ICUNIT_ASSERT_EQUAL(errno, EINVAL, errno); + ICUNIT_ASSERT_EQUAL(errno, ENOENT, errno); RecoveryFileEnv(pathList, file_number); return ICUNIT_SUCCESS; -- GitLab