[CRIU] [PATCH] test: zombie00 -- Extend information for waitpid error
Cyrill Gorcunov
gorcunov at openvz.org
Sat Oct 22 08:21:16 PDT 2016
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
test/zdtm/static/zombie00.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/test/zdtm/static/zombie00.c b/test/zdtm/static/zombie00.c
index df12a7046a2f..90aabef8ad2d 100644
--- a/test/zdtm/static/zombie00.c
+++ b/test/zdtm/static/zombie00.c
@@ -77,8 +77,10 @@ int main(int argc, char ** argv)
test_waitsig();
for (i = 0; i < NR_ZOMBIES; i++) {
- if (waitpid(zombie[i].pid, &status, 0) != zombie[i].pid) {
- fail("Exit with wrong pid\n");
+ pid_t obtained = waitpid(zombie[i].pid, &status, 0);
+ if (obtained != zombie[i].pid) {
+ fail("Exit with wrong pid (expected %d but got %d)\n",
+ zombie[i].pid, obtained);
exit(1);
}
--
2.7.4
More information about the CRIU
mailing list