test: fix get_passwd2 on IBM i (#4154)
uid 0 is `qsecofr` on IBM i. Refs: https://github.com/libuv/libuv/issues/4143
This commit is contained in:
parent
fc4840ebc9
commit
75f7de4010
@ -135,11 +135,16 @@ TEST_IMPL(get_passwd2) {
|
|||||||
|
|
||||||
len = strlen(pwd2.username);
|
len = strlen(pwd2.username);
|
||||||
ASSERT_GT(len, 0);
|
ASSERT_GT(len, 0);
|
||||||
|
#if defined(__PASE__)
|
||||||
|
// uid 0 is qsecofr on IBM i
|
||||||
|
ASSERT_STR_EQ(pwd2.username, "qsecofr");
|
||||||
|
#else
|
||||||
ASSERT_STR_EQ(pwd2.username, "root");
|
ASSERT_STR_EQ(pwd2.username, "root");
|
||||||
|
#endif
|
||||||
len = strlen(pwd2.homedir);
|
len = strlen(pwd2.homedir);
|
||||||
|
# ifndef __PASE__
|
||||||
ASSERT_GT(len, 0);
|
ASSERT_GT(len, 0);
|
||||||
|
#endif
|
||||||
len = strlen(pwd2.shell);
|
len = strlen(pwd2.shell);
|
||||||
# ifndef __PASE__
|
# ifndef __PASE__
|
||||||
ASSERT_GT(len, 0);
|
ASSERT_GT(len, 0);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user