[CRIU] [RFC PATCH 11/21] zdtm: file_locks00: report pass/fail in parent process
Ivan Shapovalov
intelfx at intelfx.name
Fri Feb 19 06:50:34 PST 2016
Signed-off-by: Ivan Shapovalov <intelfx at intelfx.name>
---
test/zdtm/live/static/file_locks00.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/test/zdtm/live/static/file_locks00.c b/test/zdtm/live/static/file_locks00.c
index f701e00..9452f86 100644
--- a/test/zdtm/live/static/file_locks00.c
+++ b/test/zdtm/live/static/file_locks00.c
@@ -164,7 +164,6 @@ int main(int argc, char **argv)
exit(1);
}
- pass();
exit(0);
}
@@ -175,7 +174,15 @@ int main(int argc, char **argv)
test_waitsig();
kill(pid, SIGTERM);
- waitpid(pid, NULL, 0);
+
+ int r;
+ waitpid(pid, &r, 0);
+ if (WIFEXITED(r) && WEXITSTATUS(r) == 0) {
+ pass();
+ } else {
+ fail("child exited with %d", r);
+ }
+
close(fd_0);
close(fd_1);
unlink(file0);
--
2.7.1
More information about the CRIU
mailing list