Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPavel Tikhomirov <ptikhomirov@virtuozzo.com>2020-05-27 16:11:20 +0300
committerAndrei Vagin <avagin@gmail.com>2022-04-29 03:53:52 +0300
commit8d6e2d04423858fbc003e41a5d0b5e60d68dab36 (patch)
treecd50140826f30ac6137eca3a9e16b64e78b71634 /test
parentb35c842d0f9778bcb13991071b97913d27fce6d2 (diff)
zdtm: enable mounts compat mode on restore with --mntns-compat-mode option
Cherry-picked from Virtuozzo criu: https://src.openvz.org/projects/OVZ/repos/criu/commits/e4a430e1f Changes: prepend --mntns-compat-mode to r_opts in zdtm.py so that we can disable this option with --no-mntns-compat-mode from test desc files. Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/zdtm.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/zdtm.py b/test/zdtm.py
index 3fbdb8a18..f15420a65 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -953,6 +953,8 @@ class criu_rpc:
if criu_rpc.pidfd_store_socket is None:
criu_rpc.pidfd_store_socket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
criu.opts.pidfd_store_sk = criu_rpc.pidfd_store_socket.fileno()
+ elif "--mntns-compat-mode" == arg:
+ criu.opts.mntns_compat_mode = True
else:
raise test_fail_exc('RPC for %s(%s) required' % (arg, args.pop(0)))
@@ -1046,6 +1048,7 @@ class criu:
self.__criu_bin = opts['criu_bin']
self.__crit_bin = opts['crit_bin']
self.__pre_dump_mode = opts['pre_dump_mode']
+ self.__mntns_compat_mode = bool(opts['mntns_compat_mode'])
if opts['rpc']:
self.__criu = criu_rpc
@@ -1444,6 +1447,9 @@ class criu:
nowait=True)
r_opts += ["--lazy-pages"]
+ if self.__mntns_compat_mode:
+ r_opts = ['--mntns-compat-mode'] + r_opts
+
if self.__leave_stopped:
r_opts += ['--leave-stopped']
@@ -2034,7 +2040,7 @@ class Launcher:
'sat', 'script', 'rpc', 'criu_config', 'lazy_pages', 'join_ns',
'dedup', 'sbs', 'freezecg', 'user', 'dry_run', 'noauto_dedup',
'remote_lazy_pages', 'show_stats', 'lazy_migrate', 'stream',
- 'tls', 'criu_bin', 'crit_bin', 'pre_dump_mode')
+ 'tls', 'criu_bin', 'crit_bin', 'pre_dump_mode', 'mntns_compat_mode')
arg = repr((name, desc, flavor, {d: self.__opts[d] for d in nd}))
if self.__use_log:
@@ -2707,6 +2713,9 @@ def get_cli_args():
help="Use splice or read mode of pre-dumping",
choices=['splice', 'read'],
default='splice')
+ rp.add_argument("--mntns-compat-mode",
+ help="Use old compat mounts restore engine",
+ action='store_true')
lp = sp.add_parser("list", help="List tests")
lp.set_defaults(action=list_tests)