mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-04 08:15:37 +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:
committed by
Pavel Emelyanov
parent
2784095aaf
commit
d35efb4abe
@@ -70,6 +70,15 @@ int main(int argc, char **argv)
|
|||||||
client("(iter1)");
|
client("(iter1)");
|
||||||
exit(0);
|
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_daemon();
|
||||||
test_waitsig();
|
test_waitsig();
|
||||||
@@ -83,12 +92,6 @@ int main(int argc, char **argv)
|
|||||||
goto unlink;
|
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 */
|
/* Test2: check it's still possible to connect to the bound socket */
|
||||||
if (fork() == 0) {
|
if (fork() == 0) {
|
||||||
exit(client("(iter2)"));
|
exit(client("(iter2)"));
|
||||||
|
Reference in New Issue
Block a user