mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 22:35:33 +00:00
zdtm: check "criu dedup"
Add a new option to zdtm.py to run "criu dedup" after "criu dump" or "criu pre-dump". Signed-off-by: Andrei Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
cd5674ea8f
commit
3b366c3141
@@ -45,7 +45,9 @@ make -C test/others/exec/ run
|
||||
./test/zdtm.py run -t zdtm/static/env00 --sibling
|
||||
|
||||
./test/zdtm.py run -t zdtm/transition/maps007 --pre 2 --dedup
|
||||
./test/zdtm.py run -t zdtm/transition/maps007 --pre 2 --noauto-dedup
|
||||
./test/zdtm.py run -t zdtm/transition/maps007 --pre 2 --page-server
|
||||
./test/zdtm.py run -t zdtm/transition/maps007 --pre 2 --page-server --dedup
|
||||
|
||||
./test/zdtm.py run -t zdtm/static/socket-tcp-local --norst
|
||||
|
||||
|
@@ -10,3 +10,5 @@ prep
|
||||
./test/zdtm.py run -t zdtm/transition/maps007 --keep-going --report report -f h --pre 8:.1 --dedup || fail
|
||||
./test/zdtm.py run -t zdtm/static/mem-touch --keep-going --report report -f h --pre 8:.1 --dedup || fail
|
||||
./test/zdtm.py run -t zdtm/transition/maps008 --keep-going --report report -f h --pre 8:.1 --dedup || fail
|
||||
./test/zdtm.py run -t zdtm/transition/maps007 --keep-going --report report -f h --pre 8:.1 --noauto-dedup || fail
|
||||
./test/zdtm.py run -t zdtm/static/mem-touch --keep-going --report report -f h --pre 8:.1 --noauto-dedup || fail
|
||||
|
@@ -759,6 +759,7 @@ class criu:
|
||||
self.__script = opts['script']
|
||||
self.__sat = (opts['sat'] and True or False)
|
||||
self.__dedup = (opts['dedup'] and True or False)
|
||||
self.__mdedup = (opts['noauto_dedup'] and True or False)
|
||||
self.__user = (opts['user'] and True or False)
|
||||
self.__leave_stopped = (opts['stop'] and True or False)
|
||||
self.__criu = (opts['rpc'] and criu_rpc or criu_cli)
|
||||
@@ -882,6 +883,8 @@ class criu:
|
||||
a_opts += ['--leave-stopped']
|
||||
|
||||
self.__criu_act(action, opts = a_opts + opts)
|
||||
if self.__mdedup and self.__iter > 1:
|
||||
self.__criu_act("dedup", opts = [])
|
||||
|
||||
if self.__leave_stopped:
|
||||
pstree_check_stopped(self.__test.getpid())
|
||||
@@ -1329,7 +1332,7 @@ class launcher:
|
||||
|
||||
nd = ('nocr', 'norst', 'pre', 'iters', 'page_server', 'sibling', 'stop',
|
||||
'fault', 'keep_img', 'report', 'snaps', 'sat', 'script', 'rpc',
|
||||
'join_ns', 'dedup', 'sbs', 'freezecg', 'user', 'dry_run')
|
||||
'join_ns', 'dedup', 'sbs', 'freezecg', 'user', 'dry_run', 'noauto_dedup')
|
||||
arg = repr((name, desc, flavor, {d: self.__opts[d] for d in nd}))
|
||||
|
||||
if self.__use_log:
|
||||
@@ -1767,6 +1770,7 @@ rp.add_argument("--join-ns", help = "Restore tests and join existing namespace",
|
||||
rp.add_argument("--pre", help = "Do some pre-dumps before dump (n[:pause])")
|
||||
rp.add_argument("--snaps", help = "Instead of pre-dumps do full dumps", action = 'store_true')
|
||||
rp.add_argument("--dedup", help = "Auto-deduplicate images on iterations", action = 'store_true')
|
||||
rp.add_argument("--noauto-dedup", help = "Manual deduplicate images on iterations", action = 'store_true')
|
||||
rp.add_argument("--nocr", help = "Do not CR anything, just check test works", action = 'store_true')
|
||||
rp.add_argument("--norst", help = "Don't restore tasks, leave them running after dump", action = 'store_true')
|
||||
rp.add_argument("--stop", help = "Check that --leave-stopped option stops ps tree.", action = 'store_true')
|
||||
|
Reference in New Issue
Block a user