[CRIU] [PATCH] zdtm: Wait for transition test to run for some time after, start

Pavel Emelyanov xemul at virtuozzo.com
Wed Mar 16 05:26:07 PDT 2016


These tests do some work while being C/R-ed, so it make sense to
let them do some progress before doing so.

Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
 test/zdtm.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/zdtm.py b/test/zdtm.py
index b523c62..465c5fa 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -363,6 +363,11 @@ class zdtm_test:
 		except:
 			raise test_fail_exc("start")
 
+		if not self.static():
+			# Wait less than a second to give the test chance to
+			# move into some semi-random state
+			time.sleep(random.random())
+
 	def kill(self, sig = signal.SIGKILL):
 		self.__freezer.thaw()
 		if self.__pid:
-- 
2.5.0


More information about the CRIU mailing list