Tests: use SIGKILL to shutdown daemons in test_thread_exit and test_tp_fail
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 19 May 2017 15:19:16 +0000 (11:19 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 19 May 2017 20:44:02 +0000 (16:44 -0400)
A current design limitation of the lttng-consumerd will cause it to
hang on shutdown if the timer management thread exits as the teardown
of channels switches off the channel's timers. The timer thread is
then expected to purge timer signals and signal when it is done.

Obviously this state will never be reached as signals are no longer
being processed. This is not dramatic as this is not what this test
is meant to test; we only want to make sure the health check signals that
something went wrong.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/tools/health/test_health.sh
tests/regression/tools/health/test_thread_exit
tests/regression/tools/health/test_tp_fail

index bc25caa5794d9c99be4a5f126117befd3b49220b..39f5b874e50e5d756e958491d7f93fef3fec6da2 100644 (file)
@@ -20,7 +20,7 @@ UST_EVENT_NAME="tp:tptest"
 KERNEL_EVENT_NAME="sched_switch"
 CHANNEL_NAME="testchan"
 HEALTH_CHECK_BIN="health_check"
-NUM_TESTS=90
+NUM_TESTS=106
 SLEEP_TIME=30
 
 source $TESTDIR/utils/utils.sh
@@ -144,9 +144,10 @@ function test_health
        if [ ${test_relayd} -eq 1 ]; then
                # We may fail to stop relayd here, and this is OK, since
                # it may have been killed volountarily by testpoint.
-               stop_lttng_relayd_notap
+               stop_lttng_relayd_notap $KILL_SIGNAL
        fi
-       stop_lttng_sessiond
+       stop_lttng_consumerd $KILL_SIGNAL
+       stop_lttng_sessiond $KILL_SIGNAL
 
        unset LTTNG_TESTPOINT_ENABLE
        unset ${test_thread_name}_${test_suffix}
index f4c84d4833d62c727d951df2f5e4cf97f9e536f5..4a07aba5cd79f3ea5bf60a8e3166351885f2c40d 100755 (executable)
@@ -23,4 +23,14 @@ SESSIOND_PRELOAD=".libs/libhealthexit.so"
 TEST_SUFFIX="EXIT"
 CURDIR=$(dirname $(readlink -f $0))
 
+# A current design limitation of the lttng-consumerd will cause it to
+# hang on shutdown if the timer management thread exits as the teardown
+# of channels switches off the channel's timers. The timer thread is
+# then expected to purge timer signals and signal when it is done.
+# Obviously this state will never be reached as signals are no longer
+# being processed. This is not dramatic as this is not what this test
+# is meant to test; we only want to make sure the health check signals that
+# something went wrong.
+KILL_SIGNAL="SIGKILL"
+
 source ${CURDIR}/test_health.sh
index 1f1529813a55044670def63f41b063a62b1831d8..abbea57f4165547e4d2cec41b7c043c46654caf6 100755 (executable)
@@ -23,4 +23,14 @@ SESSIOND_PRELOAD=".libs/libhealthtpfail.so"
 TEST_SUFFIX="TP_FAIL"
 CURDIR=$(dirname $(readlink -f $0))
 
+# A current design limitation of the lttng-consumerd will cause it to
+# hang on shutdown if the timer management thread exits as the teardown
+# of channels switches off the channel's timers. The timer thread is
+# then expected to purge timer signals and signal when it is done.
+# Obviously this state will never be reached as signals are no longer
+# being processed. This is not dramatic as this is not what this test
+# is meant to test; we only want to make sure the health check signals that
+# something went wrong.
+KILL_SIGNAL="SIGKILL"
+
 source ${CURDIR}/test_health.sh
This page took 0.026575 seconds and 4 git commands to generate.