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: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Mike Rapoport 2017-01-09 10:23:15 +02:00 committed by Andrei Vagin
parent a3aa27ef66
commit e5b4fcb6cd

View file

@ -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), '#')