[CRIU] [PATCH 2/2] zdtm.py: fix checkskip logic

Tycho Andersen tycho.andersen at canonical.com
Mon Feb 8 07:57:41 PST 2016


Fix checkskip logic, also emit a clearer reason when checkskip fails as to
why the test was skipped.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 test/zdtm.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/zdtm.py b/test/zdtm.py
index 80c51c0..071b454 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -1078,7 +1078,7 @@ def self_checkskip(tname):
 	chs = tname  + '.checkskip'
 	if os.access(chs, os.X_OK):
 		ch = subprocess.Popen([chs])
-		return ch.wait() == 0 and False or True
+		return not ch.wait() == 0
 
 	return False
 
@@ -1159,7 +1159,7 @@ def run_tests(opts):
 					continue
 
 			if self_checkskip(t):
-				l.skip(t, "self")
+				l.skip(t, "checkskip failed")
 				continue
 
 			if opts['user']:
-- 
2.5.0



More information about the CRIU mailing list