mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 14:55:39 +00:00
zdtm: show error messages in a error case
Signed-off-by: Andrew Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
2f481f02fc
commit
ed8a13b70f
12
test/zdtm.py
12
test/zdtm.py
@@ -305,6 +305,7 @@ class criu_cli:
|
|||||||
print "Run CRIU: [" + action + " " + " ".join(s_args) + "]"
|
print "Run CRIU: [" + action + " " + " ".join(s_args) + "]"
|
||||||
ret = self.__criu(action, s_args)
|
ret = self.__criu(action, s_args)
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
|
grep_errors(os.path.join(self.__ddir(), log))
|
||||||
raise test_fail_exc("CRIU %s" % action)
|
raise test_fail_exc("CRIU %s" % action)
|
||||||
|
|
||||||
def __criu_cr(self, action, opts):
|
def __criu_cr(self, action, opts):
|
||||||
@@ -518,6 +519,17 @@ def self_checkskip(tname):
|
|||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def print_sep(title, sep = "="):
|
||||||
|
sep_len = (80 - len(title) - 2) / 2
|
||||||
|
sep = sep * sep_len
|
||||||
|
print "%s %s %s" % (sep, title, sep)
|
||||||
|
|
||||||
|
def grep_errors(fname):
|
||||||
|
print_sep("grep Error")
|
||||||
|
for l in open(fname):
|
||||||
|
if "Error" in l:
|
||||||
|
print l,
|
||||||
|
print_sep("ERROR OVER")
|
||||||
|
|
||||||
def run_tests(opts):
|
def run_tests(opts):
|
||||||
excl = None
|
excl = None
|
||||||
|
Reference in New Issue
Block a user