[CRIU] [PATCH 1/2] test/zdtm.py: allow setting test timeout in the test description

Mike Rapoport rppt at linux.vnet.ibm.com
Wed Jul 26 18:06:25 MSK 2017


Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
 test/zdtm.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/zdtm.py b/test/zdtm.py
index c74aaaa..6dfee2d 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -378,6 +378,7 @@ class zdtm_test:
 		self._env = {}
 		self._deps = desc.get('deps', [])
 		self.auto_reap = True
+		self.__timeout = int(self.__desc.get('timeout') or 30)
 
 	def __make_action(self, act, env = None, root = None):
 		sys.stdout.flush()  # Not to let make's messages appear before ours
@@ -402,7 +403,7 @@ class zdtm_test:
 		return self.__name + '.pid'
 
 	def __wait_task_die(self):
-		wait_pid_die(int(self.__pid), self.__name)
+		wait_pid_die(int(self.__pid), self.__name, self.__timeout)
 
 	def __add_wperms(self):
 		# Add write perms for .out and .pid files
-- 
2.7.4



More information about the CRIU mailing list