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

zdtm/socket_close_data01: wait a child before c/r

A static test should not change its state during C/R.
Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 2784095a
...@@ -70,6 +70,15 @@ int main(int argc, char **argv) ...@@ -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) ...@@ -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)"));
......
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