Lines Matching refs:pidfd
42 int pidfd = -1; in TEST() local
46 .pidfd = ptr_to_u64(&pidfd), in TEST()
55 pidfd = open("/proc/self", O_DIRECTORY | O_RDONLY | O_CLOEXEC); in TEST()
56 ASSERT_GE(pidfd, 0); in TEST()
58 pid = sys_waitid(P_PIDFD, pidfd, &info, WEXITED, NULL); in TEST()
60 EXPECT_EQ(close(pidfd), 0); in TEST()
61 pidfd = -1; in TEST()
63 pidfd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST()
64 ASSERT_GE(pidfd, 0); in TEST()
66 pid = sys_waitid(P_PIDFD, pidfd, &info, WEXITED, NULL); in TEST()
68 EXPECT_EQ(close(pidfd), 0); in TEST()
69 pidfd = -1; in TEST()
77 pid = sys_waitid(P_PIDFD, pidfd, &info, WEXITED, NULL); in TEST()
81 EXPECT_EQ(close(pidfd), 0); in TEST()
90 int pidfd = -1; in TEST() local
94 .pidfd = ptr_to_u64(&pidfd), in TEST()
120 ASSERT_EQ(sys_waitid(P_PIDFD, pidfd, &info, WSTOPPED, NULL), 0); in TEST()
125 ASSERT_EQ(sys_pidfd_send_signal(pidfd, SIGCONT, NULL, 0), 0); in TEST()
127 ASSERT_EQ(sys_waitid(P_PIDFD, pidfd, &info, WCONTINUED, NULL), 0); in TEST()
134 ASSERT_EQ(sys_waitid(P_PIDFD, pidfd, &info, WUNTRACED, NULL), 0); in TEST()
139 ASSERT_EQ(sys_pidfd_send_signal(pidfd, SIGKILL, NULL, 0), 0); in TEST()
141 ASSERT_EQ(sys_waitid(P_PIDFD, pidfd, &info, WEXITED, NULL), 0); in TEST()
146 EXPECT_EQ(close(pidfd), 0); in TEST()
151 int pidfd; in TEST() local
169 pidfd = sys_pidfd_open(getpid(), PIDFD_NONBLOCK); in TEST()
170 EXPECT_GE(pidfd, 0) { in TEST()
176 ret = sys_waitid(P_PIDFD, pidfd, &info, WEXITED, NULL); in TEST()
179 EXPECT_EQ(close(pidfd), 0); in TEST()
189 pidfd = sys_pidfd_open(pid, PIDFD_NONBLOCK); in TEST()
190 EXPECT_GE(pidfd, 0) { in TEST()
196 flags = fcntl(pidfd, F_GETFL, 0); in TEST()
204 ret = sys_waitid(P_PIDFD, pidfd, &info, WEXITED, NULL); in TEST()
213 ret = sys_waitid(P_PIDFD, pidfd, &info, WEXITED | WNOHANG, NULL); in TEST()
216 ASSERT_EQ(fcntl(pidfd, F_SETFL, (flags & ~O_NONBLOCK)), 0); in TEST()
218 ASSERT_EQ(sys_waitid(P_PIDFD, pidfd, &info, WSTOPPED, NULL), 0); in TEST()
223 ASSERT_EQ(sys_pidfd_send_signal(pidfd, SIGCONT, NULL, 0), 0); in TEST()
225 ASSERT_EQ(sys_waitid(P_PIDFD, pidfd, &info, WEXITED, NULL), 0); in TEST()
230 EXPECT_EQ(close(pidfd), 0); in TEST()