Tests: Fix nprocesses applications shutdown
authorDavid Goulet <dgoulet@efficios.com>
Wed, 27 Mar 2013 14:21:54 +0000 (10:21 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Wed, 27 Mar 2013 14:34:13 +0000 (10:34 -0400)
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 <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
tests/regression/ust/nprocesses/test_nprocesses

index 418fda5c031c2f3c4c2e0e5937ad80dd7b24eb01..f9ed0b1906353c2bd22c44c8afee541d2ddf73ad 100755 (executable)
@@ -72,7 +72,7 @@ destroy_lttng_session $SESSION_NAME
 rm -rf $TRACE_PATH
 
 while [ -n "$(pidof $TEST_BIN_NAME)" ]; do
 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
 
        sleep 0.5
 done
 
This page took 0.026945 seconds and 5 git commands to generate.