feat: 修复测试用例
方案描述: musl升级修改了接口部分场景下的错误码,测试用例同步修改。 BREAKING CHANGE: 修复测试用例对外变更描述: 1、socket接口v1.2.0中传入错误参数返回EINVAL错误码,更新之后将返回ENOENT错误码; 2、__nscd_query接口v1.2.0中给传入错误参数返回EAFNOSUPPORT错误码,更新之后将返回ENOENT错误码。 Close: #I6WWES Signed-off-by: zhangdengyu <zhangdengyu2@huawei.com> Change-Id: Ib8a1e52b164cf78df917dc28c90f02056a80e1ed
This commit is contained in:
parent
5fb9165c08
commit
fa68ebfcd1
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue