[CRIU] [PATCH] zdtm/maps007: wait MAX_DELTA operations before daemonizing

Andrey Vagin avagin at openvz.org
Thu Jan 22 03:45:37 PST 2015


We suppose that the test is not able to exit before this moment.

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 test/zdtm/live/transition/maps007.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/test/zdtm/live/transition/maps007.c b/test/zdtm/live/transition/maps007.c
index d589b87..68ac431 100644
--- a/test/zdtm/live/transition/maps007.c
+++ b/test/zdtm/live/transition/maps007.c
@@ -70,9 +70,6 @@ int main(int argc, char **argv)
 		return 1;
 	}
 
-	if (child)
-		test_daemon();
-
 	while (1) {
 		void *ret;
 		unsigned long size;
@@ -94,6 +91,8 @@ int main(int argc, char **argv)
 		}
 
 		count++;
+		if (child && count == MAX_DELTA + 1)
+			test_daemon();
 
 		p = start + ((lrand48() * PAGE_SIZE) % MEM_SIZE);
 		size = lrand48() * PAGE_SIZE;
-- 
1.9.3



More information about the CRIU mailing list