Commit 3b366c31 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

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: 's avatarAndrei Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent cd5674ea
......@@ -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')
......
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