From 31fa4745f181bd1bdbceb89fbe27e130f5b4e2b9 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Wed, 27 Mar 2013 10:21:54 -0400 Subject: [PATCH] Tests: Fix nprocesses applications shutdown The nprocesses test is using the SIGPIPE signal to shutdown the spawned child applications. This is done in order to silence the shell message such as this one: "nprocesses/test_nprocesses: line 79: 26458 Terminated" This mechanism is broken on systems where the SIGPIPE default handler is overriden (thus no application shutdown occurs) in the executing environment. This could lead to stale applications polluting the system and causing heratic behavior in subsequent tests. This commit add a loop and check that all the spawned applications have been successfully killed. Signed-off-by: Christian Babeux Signed-off-by: David Goulet --- tests/regression/ust/nprocesses/test_nprocesses | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/regression/ust/nprocesses/test_nprocesses b/tests/regression/ust/nprocesses/test_nprocesses index 418fda5c0..f9ed0b190 100755 --- a/tests/regression/ust/nprocesses/test_nprocesses +++ b/tests/regression/ust/nprocesses/test_nprocesses @@ -72,7 +72,7 @@ destroy_lttng_session $SESSION_NAME rm -rf $TRACE_PATH while [ -n "$(pidof $TEST_BIN_NAME)" ]; do - killall -s PIPE -q $TEST_BIN_NAME >/dev/null 2>&1 + killall -q $TEST_BIN_NAME >/dev/null 2>&1 sleep 0.5 done -- 2.34.1