mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 22:35:33 +00:00
zdtm: check lazy-pages and page-server exit status after test is gone
When running with --lazy-pages or --remote-lazy-pages, the daemons should run in the background, rather than complete before t.stop() is called. Many tests try to verify things are ok after test_waitsig() and that's exactly the place where they access memory and cause page faults. Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
committed by
Andrei Vagin
parent
516b779551
commit
a9ea60f8b3
26
test/zdtm.py
26
test/zdtm.py
@@ -792,7 +792,17 @@ class criu:
|
||||
self.__lazy_pages_p = None
|
||||
self.__page_server_p = None
|
||||
|
||||
def fini(self, opts):
|
||||
def fini(self):
|
||||
if self.__lazy_pages_p:
|
||||
ret = self.__lazy_pages_p.wait()
|
||||
self.__lazy_pages_p = None
|
||||
if ret:
|
||||
raise test_fail_exc("criu lazy-pages exited with %s" % ret)
|
||||
if self.__page_server_p:
|
||||
ret = self.__page_server_p.wait()
|
||||
self.__page_server_p = None
|
||||
if ret:
|
||||
raise test_fail_exc("criu page-server exited with %s" % ret)
|
||||
return
|
||||
|
||||
def logs(self):
|
||||
@@ -982,18 +992,6 @@ class criu:
|
||||
|
||||
self.__criu_act("restore", opts = r_opts + ["--restore-detached"])
|
||||
|
||||
if self.__lazy_pages_p:
|
||||
ret = self.__lazy_pages_p.wait()
|
||||
self.__lazy_pages_p = None
|
||||
if ret:
|
||||
raise test_fail_exc("criu lazy-pages exited with %s" % ret)
|
||||
|
||||
if self.__page_server_p:
|
||||
ret = self.__page_server_p.wait()
|
||||
self.__page_server_p = None
|
||||
if ret:
|
||||
raise test_fail_exc("criu page-server exited with %s" % ret)
|
||||
|
||||
if self.__leave_stopped:
|
||||
pstree_check_stopped(self.__test.getpid())
|
||||
pstree_signal(self.__test.getpid(), signal.SIGCONT)
|
||||
@@ -1353,7 +1351,7 @@ def do_run_test(tname, tdesc, flavs, opts):
|
||||
if opts['join_ns']:
|
||||
check_joinns_state(t)
|
||||
t.stop()
|
||||
cr_api.fini(opts)
|
||||
cr_api.fini()
|
||||
try_run_hook(t, ["--clean"])
|
||||
except test_fail_exc as e:
|
||||
print_sep("Test %s FAIL at %s" % (tname, e.step), '#')
|
||||
|
Reference in New Issue
Block a user