[CRIU] [PATCH] zdtm.py: print a process tree if a timeout is expired

Andrei Vagin avagin at openvz.org
Tue Aug 30 15:08:36 PDT 2016


From: Andrei Vagin <avagin at virtuozzo.com>

It gives us more information why a test hasn't completed in time.

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

diff --git a/test/zdtm.py b/test/zdtm.py
index 9edf8ae..e792acb 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -332,10 +332,12 @@ def wait_pid_die(pid, who, tmo = 30):
 		except:  # Died
 			break
 
-		print "Wait for %s to die for %f" % (who, stime)
+		print "Wait for %s(%d) to die for %f" % (who, pid, stime)
 		time.sleep(stime)
 		stime *= 2
 	else:
+		subprocess.Popen(["ps", "-p", str(pid)]).wait()
+		subprocess.Popen(["ps", "axf", str(pid)]).wait()
 		raise test_fail_exc("%s die" % who)
 
 
@@ -456,6 +458,7 @@ class zdtm_test:
 	def kill(self, sig = signal.SIGKILL):
 		self.__freezer.thaw()
 		if self.__pid:
+			print "Send the %d signal to  %s" % (sig, self.__pid)
 			os.kill(int(self.__pid), sig)
 			self.gone(sig == signal.SIGKILL)
 
-- 
2.7.4



More information about the CRIU mailing list