mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 13:58:34 +00:00
zdtm: check lazy-pages
Cc: Adrian Reber <areber@redhat.com> Signed-off-by: Andrew Vagin <avagin@virtuozzo.com> Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
b929e86c83
commit
f59b45fba2
15
test/zdtm.py
15
test/zdtm.py
@ -775,6 +775,7 @@ class criu:
|
||||
self.__iter = 0
|
||||
self.__prev_dump_iter = None
|
||||
self.__page_server = (opts['page_server'] and True or False)
|
||||
self.__lazy_pages = (opts['lazy_pages'] and True or False)
|
||||
self.__restore_sibling = (opts['sibling'] and True or False)
|
||||
self.__join_ns = (opts['join_ns'] and True or False)
|
||||
self.__empty_ns = (opts['empty_ns'] and True or False)
|
||||
@ -961,6 +962,12 @@ class criu:
|
||||
r_opts.append('--external')
|
||||
r_opts.append('mnt[zdtm]:%s' % criu_dir)
|
||||
|
||||
lazy_pages_p = None
|
||||
if self.__lazy_pages:
|
||||
lazy_pages_p = self.__criu_act("lazy-pages", opts = [], nowait = True)
|
||||
r_opts += ["--lazy-pages"]
|
||||
time.sleep(1) # FIXME wait user fault fd socket
|
||||
|
||||
if self.__leave_stopped:
|
||||
r_opts += ['--leave-stopped']
|
||||
|
||||
@ -982,6 +989,9 @@ class criu:
|
||||
pstree_check_stopped(self.__test.getpid())
|
||||
pstree_signal(self.__test.getpid(), signal.SIGCONT)
|
||||
|
||||
if lazy_pages_p and lazy_pages_p.wait():
|
||||
raise test_fail_exc("CRIU lazy-pages")
|
||||
|
||||
@staticmethod
|
||||
def check(feature):
|
||||
return criu_cli.run("check", ["-v0", "--feature", feature]) == 0
|
||||
@ -1426,7 +1436,7 @@ class launcher:
|
||||
self.__show_progress(name)
|
||||
|
||||
nd = ('nocr', 'norst', 'pre', 'iters', 'page_server', 'sibling', 'stop', 'empty_ns',
|
||||
'fault', 'keep_img', 'report', 'snaps', 'sat', 'script', 'rpc',
|
||||
'fault', 'keep_img', 'report', 'snaps', 'sat', 'script', 'rpc', 'lazy_pages',
|
||||
'join_ns', 'dedup', 'sbs', 'freezecg', 'user', 'dry_run', 'noauto_dedup')
|
||||
arg = repr((name, desc, flavor, {d: self.__opts[d] for d in nd}))
|
||||
|
||||
@ -1706,6 +1716,8 @@ def run_tests(opts):
|
||||
run_flavs -= set(['ns', 'uns'])
|
||||
if opts['empty_ns']:
|
||||
run_flavs -= set(['h'])
|
||||
if opts['lazy_pages']:
|
||||
run_flavs -= set(['ns', 'uns'])
|
||||
|
||||
if run_flavs:
|
||||
l.run_test(t, tdesc, run_flavs)
|
||||
@ -1923,6 +1935,7 @@ rp.add_argument("-k", "--keep-img", help = "Whether or not to keep images after
|
||||
rp.add_argument("--report", help = "Generate summary report in directory")
|
||||
rp.add_argument("--keep-going", help = "Keep running tests in spite of failures", action = 'store_true')
|
||||
rp.add_argument("--ignore-taint", help = "Don't care about a non-zero kernel taint flag", action = 'store_true')
|
||||
rp.add_argument("--lazy-pages", help = "restore pages on demand", action = 'store_true')
|
||||
|
||||
lp = sp.add_parser("list", help = "List tests")
|
||||
lp.set_defaults(action = list_tests)
|
||||
|
Loading…
x
Reference in New Issue
Block a user