diff options
author | Eugene Syromyatnikov <evgsyr@gmail.com> | 2021-10-11 15:24:45 +0200 |
---|---|---|
committer | Eugene Syromyatnikov <evgsyr@gmail.com> | 2021-10-12 00:35:48 +0200 |
commit | b9a308a6e921761756b2ba32a62ee413bd67dfcd (patch) | |
tree | 73819c2e6b4f663aa82df6a971ff293ac8e725b4 /tests/pidns.c | |
parent | aab5c5a87e1c87ce23c3d76969d7a15228a3d6e0 (diff) | |
download | strace-b9a308a6e921761756b2ba32a62ee413bd67dfcd.tar.gz |
tests/pidns.c: allow skipping tests inside the pidns harness
* tests/pidns.c (pidns_fork): Handle exit code 77 from the child.
Diffstat (limited to 'tests/pidns.c')
-rw-r--r-- | tests/pidns.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/pidns.c b/tests/pidns.c index 1f00e5ed3..702415d19 100644 --- a/tests/pidns.c +++ b/tests/pidns.c @@ -140,8 +140,15 @@ pidns_fork(pid_t pgid, bool new_sid) siginfo_t siginfo; if (waitid(P_PID, pid, &siginfo, WEXITED | WNOWAIT) < 0) perror_msg_and_fail("wait"); - if (siginfo.si_code != CLD_EXITED || siginfo.si_status) - error_msg_and_fail("child terminated with nonzero exit status"); + if (siginfo.si_code != CLD_EXITED || siginfo.si_status) { + if (siginfo.si_code == CLD_EXITED && siginfo.si_status == 77) { + error_msg_and_skip("child terminated with skip exit" + " status"); + } else { + error_msg_and_fail("child terminated with nonzero exit" + " status"); + } + } return pid; } |