Make use of SAFE_WAITPID()
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
diff --git a/testcases/kernel/syscalls/fanotify/fanotify03.c b/testcases/kernel/syscalls/fanotify/fanotify03.c
index 3a75ac2..1ab8798 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify03.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify03.c
@@ -130,10 +130,7 @@
tst_brk(TBROK | TERRNO,
"sigaction(SIGCHLD, &child_action, NULL) failed");
}
- if (waitpid(-1, &child_ret, 0) < 0) {
- tst_brk(TBROK | TERRNO,
- "waitpid(-1, &child_ret, 0) failed");
- }
+ SAFE_WAITPID(-1, &child_ret, 0);
if (WIFSIGNALED(child_ret)) {
tst_res(TFAIL, "child exited due to signal %d",