diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2019-02-19 08:57:13 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2019-02-20 13:58:04 +0100 |
commit | 1c068c4f11a8f0b12a9b49b54c212315d8f1b347 (patch) | |
tree | 69d1a4797540fccf70372b10aa435cc9877f3ff9 /lib/tests/igt_exit_handler.c | |
parent | 4494052aa3c8f95c2b21acc4a1273fc4431bb71e (diff) |
lib/tests: add internal_assert_wexited/wsignaled
And convert everything over.
igt_segfault needed a bit of care to differentiate between a real
death-by-signal and igt_exit mapping a child process signal death to
an exit code.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/tests/igt_exit_handler.c')
-rw-r--r-- | lib/tests/igt_exit_handler.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tests/igt_exit_handler.c b/lib/tests/igt_exit_handler.c index 7546fde6..f8a74786 100644 --- a/lib/tests/igt_exit_handler.c +++ b/lib/tests/igt_exit_handler.c @@ -118,11 +118,11 @@ int main(int argc, char **argv) internal_assert(testfunc(NORMAL) == 0); status = testfunc(FAIL); - assert(WIFEXITED(status) && WEXITSTATUS(status) == 1); + internal_assert_wexited(status, 1); status = testfunc(SKIP); - assert(WIFEXITED(status) && WEXITSTATUS(status) == IGT_EXIT_SKIP); + internal_assert_wexited(status, IGT_EXIT_SKIP); status = testfunc(SIG); - assert(WIFSIGNALED(status) && WTERMSIG(status) == SIGTERM); + internal_assert_wsignaled(status, SIGTERM); } |