2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

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: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Andrew Vagin
2016-01-09 22:57:00 +03:00
committed by Pavel Emelyanov
parent db0cc36417
commit 4ea3acb03c

View File

@@ -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]);