2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-29 05:18:00 +00:00

zdtm/socket_close_data01: wait a child before c/r

A static test should not change its state during C/R.

Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrew Vagin 2015-12-22 14:34:00 +03:00 committed by Pavel Emelyanov
parent 2784095aaf
commit d35efb4abe

View File

@ -70,6 +70,15 @@ int main(int argc, char **argv)
client("(iter1)");
exit(0);
}
ret = 1;
if (wait(&status) == -1) {
fail("wait failed");
goto unlink;
}
if (status) {
pr_err("A child exited with 0x%x\n", status);
goto unlink;
}
test_daemon();
test_waitsig();
@ -83,12 +92,6 @@ int main(int argc, char **argv)
goto unlink;
}
ret = 1;
if (wait(NULL) == -1) {
fail("wait failed");
goto unlink;
}
/* Test2: check it's still possible to connect to the bound socket */
if (fork() == 0) {
exit(client("(iter2)"));