From 0d15e2f4d996658ea77630be596404f6fb4417d1 Mon Sep 17 00:00:00 2001 From: Pavel Tikhomirov Date: Mon, 19 May 2025 11:53:18 +0800 Subject: [PATCH] zdtm: fix check for criu binary The opts['action'] contains actor function and not the action name, so we should compare it with a function. While on it let's also add a comment about --criu-bin option if CRIU binary is missing. Signed-off-by: Pavel Tikhomirov --- test/zdtm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/zdtm.py b/test/zdtm.py index d5514af71..3339dd816 100755 --- a/test/zdtm.py +++ b/test/zdtm.py @@ -1611,6 +1611,7 @@ class criu: def available(): if not os.access(opts['criu_bin'], os.X_OK): print("CRIU binary not found at %s" % opts['criu_bin']) + print("Consider building CRIU or using '--criu-bin' option.") sys.exit(1) def kill(self): @@ -2972,7 +2973,7 @@ if __name__ == '__main__': if opts['debug']: sys.settrace(traceit) - if opts['action'] == 'run': + if opts['action'] == run_tests: criu.available() for tst in test_classes.values(): tst.available()