[CRIU] [PATCH] zdtm.py: fix overall return code for --keep-going option
Sergey Bronnikov
sergeyb at openvz.org
Thu Mar 17 03:25:58 PDT 2016
Signed-off-by: Sergey Bronnikov <sergeyb at openvz.org>
---
test/zdtm.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/test/zdtm.py b/test/zdtm.py
index 5c2d0fb..e214bf9 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -1076,12 +1076,11 @@ class launcher:
if pid != 0:
sub = self.__subs.pop(pid)
if status != 0:
+ self.__fail = True
failed_flavor = decode_flav(os.WEXITSTATUS(status))
if self.__file_report:
testline = "not ok %d - %s # flavor %s" % (self.__runtest, sub['name'].split('/')[-1:][0], failed_flavor)
print >> self.__file_report, testline
- if not opts['keep_going']:
- self.__fail = True
if sub['log']:
add_to_report(sub['log'], sub['name'].replace('/', '_') + "_" + failed_flavor + "/output")
else:
@@ -1106,12 +1105,12 @@ class launcher:
while self.__subs:
if not self.__wait_one(os.WNOHANG):
break
- if self.__fail:
+ if self.__fail and not opts['keep_going']:
raise test_fail_exc('')
def wait_all(self):
self.__wait_all()
- if self.__fail:
+ if self.__fail and not opts['keep_going']:
raise test_fail_exc('')
def finish(self):
--
2.5.0
--
sergeyb@
More information about the CRIU
mailing list