Test the case where pidfd is negative in the test

This commit is contained in:
Chen Chengjun 2025-10-20 02:30:27 +00:00 committed by Tate, Hongliang Tian
parent a22935f4c6
commit 857424de52
1 changed files with 3 additions and 0 deletions

View File

@ -82,6 +82,9 @@ FN_TEST(wait)
pfd.revents = 0;
TEST_RES(poll(&pfd, 1, 0), pfd.revents == POLLIN);
TEST_ERRNO(waitid(P_PIDFD, pid_fd, NULL, WNOHANG | WEXITED), ECHILD);
TEST_ERRNO(waitid(P_PIDFD, 100, NULL, WNOHANG | WEXITED), EBADF);
TEST_ERRNO(waitid(P_PIDFD, -100, NULL, WNOHANG | WEXITED), EINVAL);
}
END_TEST()