From e5b4fcb6cd21be853d07662faef867cb4d01148d Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Mon, 9 Jan 2017 10:23:15 +0200 Subject: [PATCH] zdtm.py: postpone waiting for lazy-pages daemon Currently we are waiting for lazy-pages daemon to finish as a part of .restore method, which may cause filling test process memory before the test process resumed it's execution after call to test_waitsig(). In such case, no page faults occur, but rather all the memory is copied in handle_remaining_pages method in uffd.c. Let's move wait(,..) after call to test.stop(). travis-ci: success for lazy-pages: add non-#PF events handling Signed-off-by: Mike Rapoport Signed-off-by: Pavel Emelyanov --- test/zdtm.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/zdtm.py b/test/zdtm.py index de4705aa2..08dbc40ec 100755 --- a/test/zdtm.py +++ b/test/zdtm.py @@ -792,6 +792,10 @@ class criu: self.__lazy_pages_p = None self.__page_server_p = None + def fini(self, opts): + if self.__lazy_pages: + wait_pid_die(int(rpidfile(self.__ddir() + "/lp.pid")), "lazy-pages") + def logs(self): return self.__dump_path @@ -995,9 +999,6 @@ class criu: pstree_check_stopped(self.__test.getpid()) pstree_signal(self.__test.getpid(), signal.SIGCONT) - if self.__lazy_pages: - wait_pid_die(int(rpidfile(self.__ddir() + "/lp.pid")), "lazy pages daemon") - @staticmethod def check(feature): return criu_cli.run("check", ["-v0", "--feature", feature]) == 0 @@ -1353,6 +1354,7 @@ def do_run_test(tname, tdesc, flavs, opts): if opts['join_ns']: check_joinns_state(t) t.stop() + cr_api.fini(opts) try_run_hook(t, ["--clean"]) except test_fail_exc as e: print_sep("Test %s FAIL at %s" % (tname, e.step), '#')