2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

zdtm: fix 'zdtm.py list' command

The command ./zdtm.py list currently fails with

    if opts['rootless']:
       ~~~~^^^^^^^^^^^^
    KeyError: 'rootless'

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
This commit is contained in:
Radostin Stoyanov
2023-01-05 17:47:21 +00:00
committed by Andrei Vagin
parent 21f5be91a9
commit a302b36940

View File

@@ -626,14 +626,14 @@ class zdtm_test:
["make", "zdtm_ct"], env=dict(os.environ, MAKEFLAGS=""))
if not os.access("zdtm/lib/libzdtmtst.a", os.F_OK):
subprocess.check_call(["make", "-C", "zdtm/"])
if opts['rootless']:
if 'rootless' in opts and opts['rootless']:
return
subprocess.check_call(
["flock", "zdtm_mount_cgroups.lock", "./zdtm_mount_cgroups", str(uuid)])
@staticmethod
def cleanup():
if opts['rootless']:
if 'rootless' in opts and opts['rootless']:
return
subprocess.check_call(
["flock", "zdtm_mount_cgroups.lock", "./zdtm_umount_cgroups", str(uuid)])