From d9ab33856fd7bef5b598c9b6a47309b3bf9b06f2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 19 May 2017 11:19:16 -0400 Subject: [PATCH] Tests: use SIGKILL to shutdown daemons in test_thread_exit and test_tp_fail MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- tests/regression/tools/health/test_health.sh | 7 ++++--- tests/regression/tools/health/test_thread_exit | 10 ++++++++++ tests/regression/tools/health/test_tp_fail | 10 ++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) 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 -- 2.34.1