[CRIU] [PATCH 1/3] zdtm.py: s/criu_cli/criu/
Pavel Emelyanov
xemul at virtuozzo.com
Wed Aug 24 06:21:27 PDT 2016
In the criu_cli class there's the whole bunch of useful code which
not CLI-specific, so drop the _cli suffix.
Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
test/zdtm.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/test/zdtm.py b/test/zdtm.py
index 0bd8e3b..0a1aa29 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -377,7 +377,7 @@ class zdtm_test:
env['ZDTM_THREAD_BOMB'] = "5"
if not test_flag(self.__desc, 'suid'):
- # Numbers should match those in criu_cli
+ # Numbers should match those in criu
env['ZDTM_UID'] = "18943"
env['ZDTM_GID'] = "58467"
env['ZDTM_GROUPS'] = "27495 48244"
@@ -638,7 +638,7 @@ criu_bin = "../criu/criu"
join_ns_file = '/run/netns/zdtm_netns'
-class criu_cli:
+class criu:
def __init__(self, opts):
self.__test = None
self.__dump_path = None
@@ -820,7 +820,7 @@ class criu_cli:
@staticmethod
def check(feature):
- return criu_cli.__criu("check", ["-v0", "--feature", feature]) == 0
+ return criu.__criu("check", ["-v0", "--feature", feature]) == 0
@staticmethod
def available():
@@ -1084,7 +1084,7 @@ def do_run_test(tname, tdesc, flavs, opts):
continue
flav = flavors[f](opts)
t = tclass(tname, tdesc, flav, fcg)
- cr_api = criu_cli(opts)
+ cr_api = criu(opts)
try:
t.start()
@@ -1311,7 +1311,7 @@ def run_tests(opts):
features = {}
if opts['pre'] or opts['snaps']:
- if not criu_cli.check("mem_dirty_track"):
+ if not criu.check("mem_dirty_track"):
print "Tracking memory is not available"
return
@@ -1381,7 +1381,7 @@ def run_tests(opts):
if feat:
if feat not in features:
print "Checking feature %s" % feat
- features[feat] = criu_cli.check(feat)
+ features[feat] = criu.check(feat)
if not features[feat]:
l.skip(t, "no %s feature" % feat)
@@ -1410,7 +1410,7 @@ def run_tests(opts):
run_flavs = set(test_flavs) & set(opts_flavs)
else:
run_flavs = set([test_flavs.pop()])
- if not criu_cli.check("userns"):
+ if not criu.check("userns"):
run_flavs -= set(['uns'])
if opts['user']:
# FIXME -- probably uns will make sense
@@ -1656,7 +1656,7 @@ if opts.get('sat', False):
if opts['debug']:
sys.settrace(traceit)
-criu_cli.available()
+criu.available()
for tst in test_classes.values():
tst.available()
--
2.5.0
More information about the CRIU
mailing list