[CRIU] [PATCH] zdtm.py: check testname.out.inprogress in error cases

Andrei Vagin avagin at openvz.org
Fri Aug 19 17:18:18 PDT 2016


From: Andrei Vagin <avagin at virtuozzo.com>

If a test crashes, its logs may be in testname.out.inprogress.

Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
---
 test/zdtm.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/test/zdtm.py b/test/zdtm.py
index a34458d..b658228 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -466,6 +466,10 @@ class zdtm_test:
 
 		res = tail(self.__name + '.out')
 		if 'PASS' not in res.split():
+			if os.access(self.__name + '.out.inprogress', os.F_OK):
+				print_sep(self.__name + '.out.inprogress')
+				print open(self.__name + '.out.inprogress').read()
+				print_sep(self.__name + '.out.inprogress')
 			raise test_fail_exc("result check")
 
 	def getpid(self):
-- 
2.7.4



More information about the CRIU mailing list