[CRIU] [PATCH v9 5/9] test: add a --post-start hook

Tycho Andersen tycho.andersen at canonical.com
Wed Oct 19 09:15:11 PDT 2016


This hook runs after the test is started, in parallel with the actual test.
This can be used in case the test and the host need to coordinate somehow
in order to set something up (e.g. for a macvlan interface).

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 test/zdtm.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/zdtm.py b/test/zdtm.py
index 8a9e973..96eb73c 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -374,6 +374,8 @@ class zdtm_test:
 
 		s = subprocess.Popen(s_args, env = env, cwd = root, close_fds = True,
 				preexec_fn = self.__freezer and self.__freezer.attach or None)
+		if act == "pid":
+			try_run_hook(self, ["--post-start"])
 		s.wait()
 
 		if self.__freezer:
-- 
2.7.4



More information about the CRIU mailing list