function signal_cleanup()
{
diag "*** Exiting ***"
- rmmod lttng-test
stop_lttng_sessiond
- rmmod lttng-clock-plugin-test
- rmmod lttng-clock
- exit 1
+ modprobe -r lttng-test lttng-clock-plugin-test lttng-clock
+ full_cleanup
}
function extract_clock_metadata()
stop_lttng_tracing_ok $SESSION_NAME
destroy_lttng_session_ok $SESSION_NAME
- rmmod lttng-test
stop_lttng_sessiond
- rmmod lttng-clock-plugin-test
- rmmod lttng-clock
+ modprobe -r lttng-test lttng-clock-plugin-test lttng-clock
local TRACE_METADATA_FILE_PATH="$(find "$TRACE_PATH" -name metadata -type f)"
local TRACE_METADATA_DIR="$(dirname "$TRACE_METADATA_FILE_PATH")"
function signal_cleanup()
{
diag "*** Exiting ***"
- rmmod lttng-test
- stop_lttng_sessiond
- exit 1
+ modprobe -r lttng-test
+ full_cleanup
}
function enable_kernel_lttng_channel_size_limit ()
rm -rf $TRACE_PATH
- rmmod lttng-test
+ modprobe -r lttng-test
stop_lttng_sessiond
}
{
diag "*** Cleaning-up test ***"
stop_test_apps
- stop_lttng_sessiond
- exit 1
+ full_cleanup
}
TESTS=(
state_file=$1
kernel_event_generator_suspended=0
trap kernel_event_generator_toogle_state SIGUSR1
- trap "exit" SIGTERM SIGINT EXIT
+
while (true); do
if [[ $kernel_event_generator_suspended -eq "1" ]]; then
touch $state_file
state_file=$1
kernel_event_generator_suspended=0
trap kernel_event_generator_toogle_state SIGUSR1
- trap "exit" SIGTERM SIGINT
+
while (true); do
if [[ $kernel_event_generator_suspended -eq "1" ]]; then
touch $state_file
state_file=$1
ust_event_generator_suspended=0
trap ust_event_generator_toogle_state SIGUSR1
- trap "exit" SIGTERM SIGINT
+
while (true); do
if [[ $ust_event_generator_suspended -eq "1" ]]; then
touch $state_file
reset_bw_limit
# invoke utils cleanup
full_cleanup
- exit 1
}
plan_tests $NUM_TESTS
function signal_cleanup()
{
diag "*** Exiting ***"
- stop_lttng_sessiond
- exit 1
+ full_cleanup
}
function enable_ust_lttng_channel_size_limit ()
{
cleanup
rm $LOG_FILE
- exit 1
+ full_cleanup
}
-trap sighandler SIGINT
-trap sighandler SIGTERM
+trap sighandler SIGINT SIGTERM
# Make sure we collect a coredump if possible.
ulimit -c unlimited
{
cleanup
rm $LOG_FILE_SESSIOND $LOG_FILE_RELAYD
- exit 1
+ full_cleanup
}
-trap sighandler SIGINT
-trap sighandler SIGTERM
+trap sighandler SIGINT SIGTERM
# Make sure we collect a coredump if possible.
ulimit -c unlimited
{
cleanup
#rm $LOG_FILE_SESSIOND $LOG_FILE_RELAYD
- exit 1
+ full_cleanup
}
-trap sighandler SIGINT
-trap sighandler SIGTERM
+trap sighandler SIGINT SIGTERM
# Make sure we collect a coredump if possible.
ulimit -c unlimited