diff options
author | kettenis <> | 2022-10-26 23:18:02 +0000 |
---|---|---|
committer | kettenis <> | 2022-10-26 23:18:02 +0000 |
commit | 58f6589b4358779b62445cadddd2635a06f0c55f (patch) | |
tree | 3a2453dc674f007f8f091cb673ed69de57495068 /src/regress/lib/libc/sys/t_wait_noproc.c | |
parent | c37e55335c8b56e764d4a5cfc3bd92c4ba302ee5 (diff) | |
download | openbsd-58f6589b4358779b62445cadddd2635a06f0c55f.tar.gz openbsd-58f6589b4358779b62445cadddd2635a06f0c55f.tar.bz2 openbsd-58f6589b4358779b62445cadddd2635a06f0c55f.zip |
Enable waitid(2) regress tests and a new test derived from NetBSD's
wait6(2) tests.
ok millert@, deraadt@
Diffstat (limited to 'src/regress/lib/libc/sys/t_wait_noproc.c')
-rw-r--r-- | src/regress/lib/libc/sys/t_wait_noproc.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/regress/lib/libc/sys/t_wait_noproc.c b/src/regress/lib/libc/sys/t_wait_noproc.c index ee3454eb70..e5137a3ea9 100644 --- a/src/regress/lib/libc/sys/t_wait_noproc.c +++ b/src/regress/lib/libc/sys/t_wait_noproc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: t_wait_noproc.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */ | 1 | /* $OpenBSD: t_wait_noproc.c,v 1.3 2022/10/26 23:18:01 kettenis Exp $ */ |
2 | /* $NetBSD: t_wait_noproc.c,v 1.5 2016/11/09 17:50:19 kamil Exp $ */ | 2 | /* $NetBSD: t_wait_noproc.c,v 1.5 2016/11/09 17:50:19 kamil Exp $ */ |
3 | 3 | ||
4 | /*- | 4 | /*- |
@@ -68,7 +68,6 @@ ATF_TC_BODY(waitpid, tc) | |||
68 | ATF_REQUIRE_ERRNO(ECHILD, waitpid(WAIT_ANY, NULL, TWAIT_OPTION) == -1); | 68 | ATF_REQUIRE_ERRNO(ECHILD, waitpid(WAIT_ANY, NULL, TWAIT_OPTION) == -1); |
69 | } | 69 | } |
70 | 70 | ||
71 | #ifndef __OpenBSD__ | ||
72 | ATF_TC(waitid); | 71 | ATF_TC(waitid); |
73 | ATF_TC_HEAD(waitid, tc) | 72 | ATF_TC_HEAD(waitid, tc) |
74 | { | 73 | { |
@@ -81,9 +80,8 @@ ATF_TC_BODY(waitid, tc) | |||
81 | { | 80 | { |
82 | ATF_REQUIRE_ERRNO(ECHILD, | 81 | ATF_REQUIRE_ERRNO(ECHILD, |
83 | waitid(P_ALL, 0, NULL, | 82 | waitid(P_ALL, 0, NULL, |
84 | WTRAPPED | WEXITED | TWAIT_OPTION) == -1); | 83 | WEXITED | TWAIT_OPTION) == -1); |
85 | } | 84 | } |
86 | #endif | ||
87 | 85 | ||
88 | ATF_TC(wait3); | 86 | ATF_TC(wait3); |
89 | ATF_TC_HEAD(wait3, tc) | 87 | ATF_TC_HEAD(wait3, tc) |
@@ -128,6 +126,7 @@ ATF_TC_BODY(wait4, tc) | |||
128 | * WTRAPPED | WEXITED | TWAIT_OPTION, NULL, NULL) == -1); | 126 | * WTRAPPED | WEXITED | TWAIT_OPTION, NULL, NULL) == -1); |
129 | * } | 127 | * } |
130 | */ | 128 | */ |
129 | #endif | ||
131 | 130 | ||
132 | /* | 131 | /* |
133 | * Generator of valid combinations of options | 132 | * Generator of valid combinations of options |
@@ -148,7 +147,9 @@ get_options6(size_t pos) | |||
148 | WEXITED, | 147 | WEXITED, |
149 | WUNTRACED, | 148 | WUNTRACED, |
150 | WSTOPPED, // SUS compatibility, equal to WUNTRACED | 149 | WSTOPPED, // SUS compatibility, equal to WUNTRACED |
150 | #ifndef __OpenBSD__ | ||
151 | WTRAPPED, | 151 | WTRAPPED, |
152 | #endif | ||
152 | WCONTINUED | 153 | WCONTINUED |
153 | }; | 154 | }; |
154 | 155 | ||
@@ -166,7 +167,6 @@ get_options6(size_t pos) | |||
166 | 167 | ||
167 | return rv; | 168 | return rv; |
168 | } | 169 | } |
169 | #endif | ||
170 | 170 | ||
171 | /* | 171 | /* |
172 | * Generator of valid combinations of options | 172 | * Generator of valid combinations of options |
@@ -243,7 +243,6 @@ ATF_TC_BODY(waitpid_options, tc) | |||
243 | } | 243 | } |
244 | } | 244 | } |
245 | 245 | ||
246 | #ifndef __OpenBSD__ | ||
247 | ATF_TC(waitid_options); | 246 | ATF_TC(waitid_options); |
248 | ATF_TC_HEAD(waitid_options, tc) | 247 | ATF_TC_HEAD(waitid_options, tc) |
249 | { | 248 | { |
@@ -265,7 +264,6 @@ ATF_TC_BODY(waitid_options, tc) | |||
265 | waitid(P_ALL, 0, NULL, o | TWAIT_OPTION) == -1); | 264 | waitid(P_ALL, 0, NULL, o | TWAIT_OPTION) == -1); |
266 | } | 265 | } |
267 | } | 266 | } |
268 | #endif | ||
269 | 267 | ||
270 | ATF_TC(wait3_options); | 268 | ATF_TC(wait3_options); |
271 | ATF_TC_HEAD(wait3_options, tc) | 269 | ATF_TC_HEAD(wait3_options, tc) |
@@ -338,9 +336,7 @@ ATF_TP_ADD_TCS(tp) | |||
338 | ATF_TP_ADD_TC(tp, wait); | 336 | ATF_TP_ADD_TC(tp, wait); |
339 | #endif | 337 | #endif |
340 | ATF_TP_ADD_TC(tp, waitpid); | 338 | ATF_TP_ADD_TC(tp, waitpid); |
341 | #ifndef __OpenBSD__ | ||
342 | ATF_TP_ADD_TC(tp, waitid); | 339 | ATF_TP_ADD_TC(tp, waitid); |
343 | #endif | ||
344 | ATF_TP_ADD_TC(tp, wait3); | 340 | ATF_TP_ADD_TC(tp, wait3); |
345 | ATF_TP_ADD_TC(tp, wait4); | 341 | ATF_TP_ADD_TC(tp, wait4); |
346 | #ifndef __OpenBSD__ | 342 | #ifndef __OpenBSD__ |
@@ -348,9 +344,7 @@ ATF_TP_ADD_TCS(tp) | |||
348 | #endif | 344 | #endif |
349 | 345 | ||
350 | ATF_TP_ADD_TC(tp, waitpid_options); | 346 | ATF_TP_ADD_TC(tp, waitpid_options); |
351 | #ifndef __OpenBSD__ | ||
352 | ATF_TP_ADD_TC(tp, waitid_options); | 347 | ATF_TP_ADD_TC(tp, waitid_options); |
353 | #endif | ||
354 | ATF_TP_ADD_TC(tp, wait3_options); | 348 | ATF_TP_ADD_TC(tp, wait3_options); |
355 | ATF_TP_ADD_TC(tp, wait4_options); | 349 | ATF_TP_ADD_TC(tp, wait4_options); |
356 | #ifndef __OpenBSD__ | 350 | #ifndef __OpenBSD__ |