summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e8c2fb9)
Scripts implementing their own trap handlers override the generic
one provided by utils.sh (full_cleanup). Invoke it at the end of
the handlers to provide the utils cleanup as well.
Moreover, change use of "rmmod" to "modprobe -r", which is better
in trap handlers because it does not print errors if the module
was not loaded yet when the signal occurs.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
function signal_cleanup()
{
diag "*** Exiting ***"
function signal_cleanup()
{
diag "*** Exiting ***"
- 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()
}
function extract_clock_metadata()
stop_lttng_tracing_ok $SESSION_NAME
destroy_lttng_session_ok $SESSION_NAME
stop_lttng_tracing_ok $SESSION_NAME
destroy_lttng_session_ok $SESSION_NAME
- 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")"
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 ***"
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 ()
}
function enable_kernel_lttng_channel_size_limit ()
{
diag "*** Cleaning-up test ***"
stop_test_apps
{
diag "*** Cleaning-up test ***"
stop_test_apps
- stop_lttng_sessiond
- exit 1
state_file=$1
kernel_event_generator_suspended=0
trap kernel_event_generator_toogle_state SIGUSR1
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
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
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
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
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
while (true); do
if [[ $ust_event_generator_suspended -eq "1" ]]; then
touch $state_file
reset_bw_limit
# invoke utils cleanup
full_cleanup
reset_bw_limit
# invoke utils cleanup
full_cleanup
function signal_cleanup()
{
diag "*** Exiting ***"
function signal_cleanup()
{
diag "*** Exiting ***"
- stop_lttng_sessiond
- exit 1
}
function enable_ust_lttng_channel_size_limit ()
}
function enable_ust_lttng_channel_size_limit ()
-trap sighandler SIGINT
-trap sighandler SIGTERM
+trap sighandler SIGINT SIGTERM
# Make sure we collect a coredump if possible.
ulimit -c unlimited
# Make sure we collect a coredump if possible.
ulimit -c unlimited
{
cleanup
rm $LOG_FILE_SESSIOND $LOG_FILE_RELAYD
{
cleanup
rm $LOG_FILE_SESSIOND $LOG_FILE_RELAYD
-trap sighandler SIGINT
-trap sighandler SIGTERM
+trap sighandler SIGINT SIGTERM
# Make sure we collect a coredump if possible.
ulimit -c unlimited
# Make sure we collect a coredump if possible.
ulimit -c unlimited
{
cleanup
#rm $LOG_FILE_SESSIOND $LOG_FILE_RELAYD
{
cleanup
#rm $LOG_FILE_SESSIOND $LOG_FILE_RELAYD
-trap sighandler SIGINT
-trap sighandler SIGTERM
+trap sighandler SIGINT SIGTERM
# Make sure we collect a coredump if possible.
ulimit -c unlimited
# Make sure we collect a coredump if possible.
ulimit -c unlimited