From bfb98244fe3987cdf6fe709062a1fcd02dfce1a4 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Wed, 9 Dec 2015 19:04:58 +0300 Subject: [PATCH] zdtm.py: Print out and strace file names Generated files are often analyzed after test, so it's handy to have their full names on the screen at once. Signed-off-by: Pavel Emelyanov Acked-by: Andrew Vagin --- test/zdtm.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/zdtm.py b/test/zdtm.py index ec44c7536..4dc381858 100755 --- a/test/zdtm.py +++ b/test/zdtm.py @@ -590,7 +590,9 @@ class criu_cli: strace = [] if self.__sat: - strace = ["strace", "-o", os.path.join(self.__ddir(), action + '.strace'), '-T'] + fname = os.path.join(self.__ddir(), action + '.strace') + print_fname(fname, 'strace') + strace = ["strace", "-o", fname, '-T'] if action == 'restore': strace += [ '-f' ] s_args += [ '--action-script', os.getcwd() + '/../scripts/fake-restore.sh' ] @@ -906,6 +908,10 @@ def self_checkskip(tname): return False +def print_fname(fname, typ): + print "=[%s]=> %s" % (typ, fname) + + def print_sep(title, sep = "=", width = 80): print (" " + title + " ").center(width, sep) @@ -914,6 +920,7 @@ def grep_errors(fname): for l in open(fname): if "Error" in l: if first: + print_fname(fname, 'log') print_sep("grep Error", "-", 60) first = False print l,