Commit 4ea3acb0 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

zdtm/session00: wait when a child closes fd

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

===================== Run zdtm/live/static/session00 in ns =====================
Start test
./session00 --pidfile=session00.pid --outfile=session00.out
Run criu dump
Run criu restore
7: Old files lost: set(['4'])
7: New files appeared: set([])
############# Test zdtm/live/static/session00 FAIL at fds compare ##############
Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent db0cc364
......@@ -151,6 +151,12 @@ child:
pr_perror("read failed");
return 1;
}
/* wait when a child closes fd */
ret = read(p[0], &testcases[i].pid, sizeof(pid));
if (ret != 0)) {
pr_perror("read failed");
return 1;
}
close(p[0]);
......
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