Commit e5b4fcb6 authored by Mike Rapoport's avatar Mike Rapoport Committed by Andrei Vagin

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(<lazy-pages-pid>,..) after call to test.stop().

travis-ci: success for lazy-pages: add non-#PF events handling
Signed-off-by: 's avatarMike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent a3aa27ef
...@@ -792,6 +792,10 @@ class criu: ...@@ -792,6 +792,10 @@ class criu:
self.__lazy_pages_p = None self.__lazy_pages_p = None
self.__page_server_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): def logs(self):
return self.__dump_path return self.__dump_path
...@@ -995,9 +999,6 @@ class criu: ...@@ -995,9 +999,6 @@ class criu:
pstree_check_stopped(self.__test.getpid()) pstree_check_stopped(self.__test.getpid())
pstree_signal(self.__test.getpid(), signal.SIGCONT) pstree_signal(self.__test.getpid(), signal.SIGCONT)
if self.__lazy_pages:
wait_pid_die(int(rpidfile(self.__ddir() + "/lp.pid")), "lazy pages daemon")
@staticmethod @staticmethod
def check(feature): def check(feature):
return criu_cli.run("check", ["-v0", "--feature", feature]) == 0 return criu_cli.run("check", ["-v0", "--feature", feature]) == 0
...@@ -1353,6 +1354,7 @@ def do_run_test(tname, tdesc, flavs, opts): ...@@ -1353,6 +1354,7 @@ def do_run_test(tname, tdesc, flavs, opts):
if opts['join_ns']: if opts['join_ns']:
check_joinns_state(t) check_joinns_state(t)
t.stop() t.stop()
cr_api.fini(opts)
try_run_hook(t, ["--clean"]) try_run_hook(t, ["--clean"])
except test_fail_exc as e: except test_fail_exc as e:
print_sep("Test %s FAIL at %s" % (tname, e.step), '#') print_sep("Test %s FAIL at %s" % (tname, e.step), '#')
......
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