[CRIU] [PATCH 2/2] zdtm/mountpoints: wait when a child process opens descriptors
Andrey Vagin
avagin at openvz.org
Fri Dec 18 11:17:09 PST 2015
From: Andrew Vagin <avagin at virtuozzo.com>
Otherwise we can see this error:
5: Old files lost: set([])
5: New files appeared: set(['5', '6'])
Reported-by: Mr Jenkins
Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
test/zdtm/live/static/mountpoints.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/test/zdtm/live/static/mountpoints.c b/test/zdtm/live/static/mountpoints.c
index f76770b..042deeb 100644
--- a/test/zdtm/live/static/mountpoints.c
+++ b/test/zdtm/live/static/mountpoints.c
@@ -25,6 +25,8 @@ struct ns_exec_args {
int status_pipe[2];
};
+task_waiter_t t;
+
int ns_child(void *_arg)
{
struct stat st;
@@ -50,6 +52,8 @@ int ns_child(void *_arg)
pid = fork();
+ task_waiter_complete(&t, 1);
+
test_waitsig();
if (pid) {
@@ -76,6 +80,8 @@ int main(int argc, char **argv)
test_init(argc, argv);
+ task_waiter_init(&t);
+
rmdir(MPTS_ROOT);
if (mkdir(MPTS_ROOT, 0600) < 0) {
fail("Can't make zdtm_sys");
@@ -225,6 +231,8 @@ int main(int argc, char **argv)
}
}
+ task_waiter_wait4(&t, 1);
+
test_daemon();
test_waitsig();
--
2.4.3
More information about the CRIU
mailing list