Skip to content

Commit 53740a0

Browse files
committed
test: change test for failing getsid to use -1 as the argument
because calling getsid with -1 as the argument will guarantee the getsid syscall fails Signed-off-by: ZakyHermawan <[email protected]>
1 parent 4e9b140 commit 53740a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libc/test/src/unistd/getsid_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ TEST(LlvmLibcGetPidTest, GetCurrSID) {
1515
ASSERT_NE(sid, -1);
1616
ASSERT_ERRNO_SUCCESS();
1717

18-
pid_t nonexist_sid = LIBC_NAMESPACE::getsid(999999);
18+
pid_t nonexist_sid = LIBC_NAMESPACE::getsid(-1);
1919
ASSERT_EQ(nonexist_sid, -1);
2020
ASSERT_ERRNO_FAILURE();
2121
}

0 commit comments

Comments
 (0)