Tests: Use SIGTERM instead of SIGKILL
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 29 Mar 2018 20:19:39 +0000 (16:19 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 3 Apr 2018 20:09:32 +0000 (16:09 -0400)
The use of SIGKILL does not guarantee the immediate termination of sub
background task. Using SIGTERM allows the generator to finish cleanly.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/tools/notification/test_notification_multi_app

index 0a05ea6a0a8e3114fd758a8d0cb7e6e18f160e8b..eca9688cfea3653f355d241f3bdaea645729b8be 100755 (executable)
@@ -315,7 +315,7 @@ function test_multi_app_ust ()
 
        test_multi_app ust $generator_pid
 
-       kill -9 $generator_pid 2> /dev/null
+       kill -s SIGTERM $generator_pid 2> /dev/null
        wait $generator_pid 2> /dev/null
        rm -rf ${TESTAPP_STATE_FILE} 2> /dev/null
 }
@@ -331,7 +331,7 @@ function test_multi_app_kernel ()
        test_multi_app kernel $generator_pid
 
 
-       kill -9 $generator_pid 2>/dev/null
+       kill -s SIGTERM $generator_pid 2> /dev/null
        wait $generator_pid 2> /dev/null
        rm -rf ${TESTAPP_STATE_FILE} 2> /dev/null
 
@@ -348,7 +348,7 @@ function test_on_register_evaluation_ust ()
 
        test_on_register_evaluation ust $generator_pid
 
-       kill -9 $generator_pid 2> /dev/null
+       kill -s SIGTERM $generator_pid 2> /dev/null
        wait $generator_pid 2> /dev/null
        rm -rf ${TESTAPP_STATE_FILE} 2> /dev/null
 
@@ -366,7 +366,7 @@ function test_on_register_evaluation_kernel()
        test_on_register_evaluation kernel $generator_pid
 
 
-       kill -9 $generator_pid 2> /dev/null
+       kill -s SIGTERM $generator_pid 2> /dev/null
        wait $generator_pid 2> /dev/null
        rm -rf ${TESTAPP_STATE_FILE} 2> /dev/null
 
@@ -458,7 +458,7 @@ function test_on_register_evaluation ()
        destroy_lttng_session_ok $SESSION_NAME
        stop_lttng_sessiond
 
-       kill -9 $generator_pid
+       kill -s SIGTERM $generator_pid 2> /dev/null
        wait $generator_pid 2> /dev/null
 
        for pipe in "${consumerd_pipe[@]}"; do
This page took 0.028617 seconds and 4 git commands to generate.