Commit 06660976 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

zdtm: add more logging messages

Tests fail sometimes, but logs don't contain enough information:
Execute zdtm/live/static/umask00
./umask00 --pidfile=umask00.pid --outfile=umask00.out --mask=0345
make[3]: *** [umask00.pid] Error 1
ERROR: fail to start zdtm/live/static/umask00
Signed-off-by: 's avatarAndrew Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 10bfe8fa
...@@ -216,7 +216,8 @@ int ns_init(int argc, char **argv) ...@@ -216,7 +216,8 @@ int ns_init(int argc, char **argv)
} }
ret = 1; ret = 1;
waitpid(pid, &ret, 0); waitpid(pid, &ret, 0);
if (ret)
fprintf(stderr, "The test returned non-zero code %d\n", ret);
pid = fork(); pid = fork();
if (pid == 0) { if (pid == 0) {
...@@ -293,11 +294,15 @@ void ns_create(int argc, char **argv) ...@@ -293,11 +294,15 @@ void ns_create(int argc, char **argv)
status = 1; status = 1;
ret = read(args.status_pipe[0], &status, sizeof(status)); ret = read(args.status_pipe[0], &status, sizeof(status));
if (ret != sizeof(status) || status) if (ret != sizeof(status) || status) {
fprintf(stderr, "The test failed (%d, %d)\n", ret, status);
exit(1); exit(1);
}
ret = read(args.status_pipe[0], &status, sizeof(status)); ret = read(args.status_pipe[0], &status, sizeof(status));
if (ret != 0) if (ret != 0) {
fprintf(stderr, "Unexpected message from test\n");
exit(1); exit(1);
}
pidfile = getenv("ZDTM_PIDFILE"); pidfile = getenv("ZDTM_PIDFILE");
if (pidfile == NULL) if (pidfile == NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment