From: Jérémie Galarneau Date: Fri, 19 May 2017 15:19:16 +0000 (-0400) Subject: Tests: use SIGKILL to shutdown daemons in test_thread_exit and test_tp_fail X-Git-Tag: v2.10.0-rc2~53 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f2bae05bf45c4ce894946c7c386cfdab20784589;p=lttng-tools.git Tests: use SIGKILL to shutdown daemons in test_thread_exit and test_tp_fail 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 --- diff --git a/tests/regression/tools/health/test_health.sh b/tests/regression/tools/health/test_health.sh index bc25caa57..39f5b874e 100644 --- a/tests/regression/tools/health/test_health.sh +++ b/tests/regression/tools/health/test_health.sh @@ -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} diff --git a/tests/regression/tools/health/test_thread_exit b/tests/regression/tools/health/test_thread_exit index f4c84d483..4a07aba5c 100755 --- a/tests/regression/tools/health/test_thread_exit +++ b/tests/regression/tools/health/test_thread_exit @@ -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 diff --git a/tests/regression/tools/health/test_tp_fail b/tests/regression/tools/health/test_tp_fail index 1f1529813..abbea57f4 100755 --- a/tests/regression/tools/health/test_tp_fail +++ b/tests/regression/tools/health/test_tp_fail @@ -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