[igt-dev] [PATCH i-g-t] lib: Kill residual children at the end of a subtest

Chris Wilson chris at chris-wilson.co.uk
Sun Feb 2 18:56:49 UTC 2020


Ensure that we tidy up all the excess children left behind by a failing
subtest, we do not want them loitering into the next!

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 lib/igt_core.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/igt_core.c b/lib/igt_core.c
index a0bf29408..65c80fbba 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -1362,6 +1362,10 @@ static void exit_subtest(const char *result)
 
 	igt_terminate_spins();
 
+	for (int c = 0; c < num_test_children; c++)
+		kill(test_children[c], SIGKILL);
+	num_test_children = 0;
+
 	if (!in_dynamic_subtest)
 		_igt_dynamic_tests_executed = -1;
 
-- 
2.25.0



More information about the igt-dev mailing list