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

Submitted by Tycho Andersen on Oct. 19, 2016, 4:15 p.m.

Details

Message ID 1476893715-24058-6-git-send-email-tycho.andersen@canonical.com
State Superseded
Series "Series without cover letter"
Headers show

Commit Message

Tycho Andersen Oct. 19, 2016, 4:15 p.m.
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@canonical.com>
---
 test/zdtm.py | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

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: