mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-28 20:42:49 +00:00
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: Andrew Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
10bfe8fae8
commit
066609769a
1 changed files with 8 additions and 3 deletions
|
|
@ -216,7 +216,8 @@ int ns_init(int argc, char **argv)
|
|||
}
|
||||
ret = 1;
|
||||
waitpid(pid, &ret, 0);
|
||||
|
||||
if (ret)
|
||||
fprintf(stderr, "The test returned non-zero code %d\n", ret);
|
||||
|
||||
pid = fork();
|
||||
if (pid == 0) {
|
||||
|
|
@ -293,11 +294,15 @@ void ns_create(int argc, char **argv)
|
|||
|
||||
status = 1;
|
||||
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);
|
||||
}
|
||||
ret = read(args.status_pipe[0], &status, sizeof(status));
|
||||
if (ret != 0)
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "Unexpected message from test\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
pidfile = getenv("ZDTM_PIDFILE");
|
||||
if (pidfile == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue