From 67b4c664e2c6c6dc19920555c0abf094ed6cbe00 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Fri, 24 Apr 2015 16:29:40 -0400 Subject: [PATCH] Refactor: test: wrapper for destroy_lttng_session MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- tests/regression/kernel/test_all_events | 2 +- tests/regression/kernel/test_event_basic | 4 +- tests/regression/kernel/test_syscall | 40 ++++++++-------- .../regression/tools/exclusion/test_exclusion | 2 +- .../tools/filtering/test_invalid_filter | 4 +- .../tools/filtering/test_unsupported_op | 2 +- .../tools/filtering/test_valid_filter | 2 +- tests/regression/tools/health/test_thread_ok | 4 +- tests/regression/tools/live/test_lttng_kernel | 2 +- tests/regression/tools/live/test_lttng_ust | 2 +- tests/regression/tools/mi/test_mi | 6 +-- tests/regression/tools/save-load/test_load | 10 ++-- tests/regression/tools/save-load/test_save | 12 ++--- tests/regression/tools/snapshots/test_kernel | 8 ++-- .../tools/snapshots/test_kernel_streaming | 6 +-- .../tools/snapshots/test_ust_streaming | 8 ++-- tests/regression/tools/snapshots/ust_test | 14 +++--- .../streaming/test_high_throughput_limits | 2 +- tests/regression/tools/streaming/test_kernel | 4 +- tests/regression/tools/streaming/test_ust | 4 +- .../tracefile-limits/test_tracefile_count | 2 +- .../tracefile-limits/test_tracefile_size | 2 +- .../ust/before-after/test_before_after | 4 +- .../ust/buffers-pid/test_buffers_pid | 10 ++-- .../ust/high-throughput/test_high_throughput | 2 +- tests/regression/ust/java-jul/test_java_jul | 46 +++++++++---------- .../regression/ust/java-log4j/test_java_log4j | 46 +++++++++---------- .../ust/low-throughput/test_low_throughput | 2 +- .../ust/multi-session/test_multi_session | 2 +- .../regression/ust/nprocesses/test_nprocesses | 2 +- tests/regression/ust/overlap/test_overlap | 2 +- .../test_periodical_metadata_flush | 8 ++-- .../ust/python-logging/test_python_logging | 46 +++++++++---------- tests/regression/ust/test_event_basic | 4 +- tests/regression/ust/test_event_perf | 2 +- tests/regression/ust/test_event_tracef | 2 +- tests/regression/ust/test_event_wildcard | 2 +- .../stress/test_multi_sessions_per_uid_10app | 2 +- ...test_multi_sessions_per_uid_5app_streaming | 2 +- ...essions_per_uid_5app_streaming_kill_relayd | 2 +- tests/utils/utils.sh | 16 ++++++- 41 files changed, 178 insertions(+), 166 deletions(-) diff --git a/tests/regression/kernel/test_all_events b/tests/regression/kernel/test_all_events index 9ea847b48..50002f4d9 100755 --- a/tests/regression/kernel/test_all_events +++ b/tests/regression/kernel/test_all_events @@ -37,7 +37,7 @@ function test_all_event() validate_trace "sched_switch" $TRACE_PATH - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } diff --git a/tests/regression/kernel/test_event_basic b/tests/regression/kernel/test_event_basic index c57858af4..aeca02b68 100755 --- a/tests/regression/kernel/test_event_basic +++ b/tests/regression/kernel/test_event_basic @@ -41,7 +41,7 @@ function test_event_basic() validate_trace "sched_process_exit" $TRACE_PATH validate_trace "sched_process_free" $TRACE_PATH - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -62,7 +62,7 @@ function test_enable_after_start() validate_trace "sched_switch" $TRACE_PATH validate_trace "sched_process_exit" $TRACE_PATH - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } diff --git a/tests/regression/kernel/test_syscall b/tests/regression/kernel/test_syscall index 95f612455..57adad905 100755 --- a/tests/regression/kernel/test_syscall +++ b/tests/regression/kernel/test_syscall @@ -76,7 +76,7 @@ function test_syscall_simple_list() # ensure trace only contains those. validate_trace_only_exp "-e syscall_entry_$EVENT_NAME: -e compat_syscall_entry_$EVENT_NAME: -e syscall_exit_$EVENT_NAME: -e compat_syscall_exit_$EVENT_NAME:" $TRACE_PATH - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -113,7 +113,7 @@ function test_syscall_simple_list_two() # ensure trace only contains those. validate_trace_only_exp "-e syscall_entry_$EVENT_NAME: -e compat_syscall_entry_$EVENT_NAME: -e syscall_exit_$EVENT_NAME: -e compat_syscall_exit_$EVENT_NAME: -e syscall_entry_$EVENT_NAME2: -e compat_syscall_entry_$EVENT_NAME2: -e syscall_exit_$EVENT_NAME2: -e compat_syscall_exit_$EVENT_NAME2:" $TRACE_PATH - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -140,7 +140,7 @@ function test_syscall_single() # ensure trace only contains those. validate_trace_only_exp "-e syscall_entry_open: -e compat_syscall_entry_open: -e syscall_exit_open: -e compat_syscall_exit_open:" $TRACE_PATH - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -170,7 +170,7 @@ function test_syscall_two() # ensure trace only contains those. validate_trace_only_exp "-e syscall_entry_open: -e compat_syscall_entry_open: -e syscall_exit_open: -e compat_syscall_exit_open: -e syscall_entry_close: -e compat_syscall_entry_close: -e syscall_exit_close: -e compat_syscall_exit_close:" $TRACE_PATH - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -198,7 +198,7 @@ function test_syscall_all() validate_trace_exp "-e syscall_exit_close: -e compat_syscall_exit_close:" $TRACE_PATH # trace may contain other syscalls. - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -229,7 +229,7 @@ function test_syscall_all_disable_one() validate_trace_exp "-e syscall_entry_close: -e compat_syscall_entry_close:" $TRACE_PATH validate_trace_exp "-e syscall_exit_close: -e compat_syscall_exit_close:" $TRACE_PATH - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -266,7 +266,7 @@ function test_syscall_all_disable_two() validate_trace_exp "-e syscall_entry_execve: -e compat_syscall_entry_execve:" $TRACE_PATH validate_trace_exp "-e syscall_exit_execve: -e compat_syscall_exit_execve:" $TRACE_PATH - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -293,7 +293,7 @@ function test_syscall_enable_all_disable_all() # ensure nothing has been traced. validate_trace_empty $TRACE_PATH - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -326,7 +326,7 @@ function test_syscall_enable_all_disable_all_enable_all() validate_trace_exp "-e syscall_exit_close: -e compat_syscall_exit_close:" $TRACE_PATH # trace may contain other syscalls. - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -357,7 +357,7 @@ function test_syscall_enable_all_disable_all_twice() # ensure nothing has been traced. validate_trace_empty $TRACE_PATH - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -384,7 +384,7 @@ function test_syscall_enable_one_disable_one() # ensure nothing has been traced. validate_trace_empty $TRACE_PATH - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -413,7 +413,7 @@ function test_syscall_enable_two_disable_two() # ensure nothing has been traced. validate_trace_empty $TRACE_PATH - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -445,7 +445,7 @@ function test_syscall_enable_two_disable_one() # ensure trace only contains those. validate_trace_only_exp "-e syscall_entry_open: -e compat_syscall_entry_open: -e syscall_exit_open: -e compat_syscall_exit_open:" $TRACE_PATH - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -465,7 +465,7 @@ function test_syscall_disable_twice() # Second disable succeeds too, due to enabler semantic. lttng_disable_kernel_syscall_ok $SESSION_NAME "open" - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -485,7 +485,7 @@ function test_syscall_disable_all_twice() # Second disable succeeds too, due to enabler semantic. lttng_disable_kernel_syscall_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -504,7 +504,7 @@ function test_syscall_enable_unknown() # semantic. lttng_enable_kernel_syscall_ok $SESSION_NAME "thissyscallcannotexist" - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -522,7 +522,7 @@ function test_syscall_enable_all_enable_one() # Enabling an event already enabled succeeds, due to enabler semantic. lttng_enable_kernel_syscall_ok $SESSION_NAME "open" - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -541,7 +541,7 @@ function test_syscall_disable_all_disable_one() # Disabling an event already disabled fails. lttng_disable_kernel_syscall_fail $SESSION_NAME "open" - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -561,7 +561,7 @@ function test_syscall_enable_channel_disable_all() # it knowns about. Disable all succeeds if it finds no match. lttng_disable_kernel_syscall_ok $SESSION_NAME "-a" $CHANNEL_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } @@ -579,7 +579,7 @@ function test_syscall_enable_channel_disable_one() lttng_enable_kernel_channel_ok $SESSION_NAME $CHANNEL_NAME lttng_disable_kernel_syscall_fail $SESSION_NAME "open" $CHANNEL_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } diff --git a/tests/regression/tools/exclusion/test_exclusion b/tests/regression/tools/exclusion/test_exclusion index 0033c7ed5..b91399401 100755 --- a/tests/regression/tools/exclusion/test_exclusion +++ b/tests/regression/tools/exclusion/test_exclusion @@ -62,7 +62,7 @@ function test_exclusion stop_lttng_tracing_ok $SESSION_NAME # Destroy session - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME stats=`babeltrace $trace_path | $STATS_BIN --tracepoint $EV_EXCLUDE_NAME | grep -v index` if [ ! -z "$stats" ]; then diff --git a/tests/regression/tools/filtering/test_invalid_filter b/tests/regression/tools/filtering/test_invalid_filter index c639ff172..4ba4b8b40 100755 --- a/tests/regression/tools/filtering/test_invalid_filter +++ b/tests/regression/tools/filtering/test_invalid_filter @@ -60,7 +60,7 @@ function test_invalid_filter enable_ust_lttng_event_filter $SESSION_NAME $EVENT_NAME "$test_invalid_filter" # Destroy session - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME } function test_bytecode_limit @@ -78,7 +78,7 @@ function test_bytecode_limit enable_ust_lttng_event_filter $SESSION_NAME $EVENT_NAME "$BYTECODE_LIMIT" # Destroy session - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME } plan_tests $NUM_TESTS diff --git a/tests/regression/tools/filtering/test_unsupported_op b/tests/regression/tools/filtering/test_unsupported_op index d60814922..0c8ceb7b0 100755 --- a/tests/regression/tools/filtering/test_unsupported_op +++ b/tests/regression/tools/filtering/test_unsupported_op @@ -78,7 +78,7 @@ function test_unsupported_op fi # Destroy session - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME return 0 } diff --git a/tests/regression/tools/filtering/test_valid_filter b/tests/regression/tools/filtering/test_valid_filter index 42f32e705..df4eb47e3 100755 --- a/tests/regression/tools/filtering/test_valid_filter +++ b/tests/regression/tools/filtering/test_valid_filter @@ -70,7 +70,7 @@ function test_valid_filter stop_lttng_tracing_ok $SESSION_NAME # Destroy session - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME stats=`babeltrace $trace_path | $STATS_BIN --tracepoint $EVENT_NAME` diff --git a/tests/regression/tools/health/test_thread_ok b/tests/regression/tools/health/test_thread_ok index 5efe49fe1..ae4596ad7 100755 --- a/tests/regression/tools/health/test_thread_ok +++ b/tests/regression/tools/health/test_thread_ok @@ -81,7 +81,7 @@ function test_thread_ok create_lttng_session_no_output $SESSION_NAME enable_ust_lttng_event_ok $SESSION_NAME $UST_EVENT_NAME $CHANNEL_NAME start_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Check health status $CURDIR/$HEALTH_CHECK_BIN > ${STDOUT_PATH} 2> ${STDERR_PATH} @@ -93,7 +93,7 @@ function test_thread_ok create_lttng_session_no_output $SESSION_NAME lttng_enable_kernel_event $SESSION_NAME $KERNEL_EVENT_NAME $CHANNEL_NAME start_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Check health status $CURDIR/$HEALTH_CHECK_BIN > ${STDOUT_PATH} 2> ${STDERR_PATH} diff --git a/tests/regression/tools/live/test_lttng_kernel b/tests/regression/tools/live/test_lttng_kernel index 084649f9b..98f3b9e9d 100755 --- a/tests/regression/tools/live/test_lttng_kernel +++ b/tests/regression/tools/live/test_lttng_kernel @@ -55,7 +55,7 @@ function setup_live_tracing() function clean_live_tracing() { stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME } # Need root access for kernel tracing. diff --git a/tests/regression/tools/live/test_lttng_ust b/tests/regression/tools/live/test_lttng_ust index bf66603f6..7d6cc93f1 100755 --- a/tests/regression/tools/live/test_lttng_ust +++ b/tests/regression/tools/live/test_lttng_ust @@ -69,7 +69,7 @@ function setup_live_tracing() function clean_live_tracing() { stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME } start_lttng_sessiond diff --git a/tests/regression/tools/mi/test_mi b/tests/regression/tools/mi/test_mi index 5d2d4513f..515c040df 100755 --- a/tests/regression/tools/mi/test_mi +++ b/tests/regression/tools/mi/test_mi @@ -151,7 +151,7 @@ function test_create_session () is_command_success $OUTPUT_DEST true OUTPUT_DEST=$DEVNULL - destroy_lttng_session $session_name + destroy_lttng_session_ok $session_name } function test_destroy_session () @@ -170,7 +170,7 @@ function test_destroy_session () done OUTPUT_DEST=$OUTPUT_DIR/$OUTPUT_FILE - destroy_lttng_session ${session_name[0]} + destroy_lttng_session_ok ${session_name[0]} $XML_VALIDATE $OUTPUT_DEST ok $? "MI test: destroy session ${session_name[0]} xsd validation" @@ -191,7 +191,7 @@ function test_destroy_session () ok $? "Mi test: $num / 2 sessions discovered" #Verify that if no session is present command fail and mi report it. - destroy_lttng_session ${session_name[0]} 1 + destroy_lttng_session_fail ${session_name[0]} $XML_VALIDATE $OUTPUT_DEST ok $? "MI test: failing destroy session ${session_name[0]} xsd validation" extract_xml $OUTPUT_DEST $XPATH_COMMAND_SUCCESS result diff --git a/tests/regression/tools/save-load/test_load b/tests/regression/tools/save-load/test_load index 6b892cfdc..c6234efe1 100755 --- a/tests/regression/tools/save-load/test_load +++ b/tests/regression/tools/save-load/test_load @@ -54,7 +54,7 @@ function test_basic_load() lttng_load "-i $CURDIR/$SESSION_NAME.lttng" - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME } function test_complex_load() @@ -90,7 +90,7 @@ function test_complex_load() else fail "Disabled event is loaded in disabled state" fi - destroy_lttng_session $sess + destroy_lttng_session_ok $sess stop_lttng_relayd_nocheck } @@ -105,8 +105,8 @@ function test_all_load() lttng_load "-a -i $CURDIR" - destroy_lttng_session $SESSION_NAME - destroy_lttng_session "$SESSION_NAME-complex" + destroy_lttng_session_ok $SESSION_NAME + destroy_lttng_session_ok "$SESSION_NAME-complex" stop_lttng_relayd_nocheck } @@ -120,7 +120,7 @@ function test_overwrite() # This one should succeed lttng_load "-f -i $CURDIR $SESSION_NAME" - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME } start_lttng_sessiond diff --git a/tests/regression/tools/save-load/test_save b/tests/regression/tools/save-load/test_save index 299776fba..674d00134 100755 --- a/tests/regression/tools/save-load/test_save +++ b/tests/regression/tools/save-load/test_save @@ -73,7 +73,7 @@ function test_basic_save() is_session_saved $TRACE_PATH $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME } function test_basic_save_all() @@ -98,9 +98,9 @@ function test_basic_save_all() is_session_saved $TRACE_PATH $SESSION_NAME-2 is_session_saved $TRACE_PATH $SESSION_NAME-3 - destroy_lttng_session $SESSION_NAME-1 - destroy_lttng_session $SESSION_NAME-2 - destroy_lttng_session $SESSION_NAME-3 + destroy_lttng_session_ok $SESSION_NAME-1 + destroy_lttng_session_ok $SESSION_NAME-2 + destroy_lttng_session_ok $SESSION_NAME-3 } function test_overwrite() @@ -115,7 +115,7 @@ function test_overwrite() is_session_saved $TRACE_PATH $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Create a new session with same name so we can force the overwrite create_lttng_session_ok $SESSION_NAME $TRACE_PATH @@ -130,7 +130,7 @@ function test_overwrite() is_session_saved $TRACE_PATH $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME } start_lttng_sessiond diff --git a/tests/regression/tools/snapshots/test_kernel b/tests/regression/tools/snapshots/test_kernel index b4c7f9146..9dac4596b 100755 --- a/tests/regression/tools/snapshots/test_kernel +++ b/tests/regression/tools/snapshots/test_kernel @@ -45,7 +45,7 @@ function test_kernel_local_snapshot () lttng_snapshot_add_output $SESSION_NAME $TRACE_PATH lttng_snapshot_record $SESSION_NAME stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test validate_trace $EVENT_NAME $TRACE_PATH/ @@ -67,7 +67,7 @@ function test_kernel_local_snapshot_after_stop () stop_lttng_tracing_ok $SESSION_NAME lttng_snapshot_add_output $SESSION_NAME $TRACE_PATH lttng_snapshot_record $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test validate_trace $EVENT_NAME $TRACE_PATH/ @@ -115,7 +115,7 @@ function test_kernel_local_snapshot_append_to_metadata () fi stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME } function test_kernel_1000_local_snapshots () @@ -142,7 +142,7 @@ function test_kernel_1000_local_snapshots () fi done stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME } plan_tests $NUM_TESTS diff --git a/tests/regression/tools/snapshots/test_kernel_streaming b/tests/regression/tools/snapshots/test_kernel_streaming index e37b8d464..aa4c5b558 100755 --- a/tests/regression/tools/snapshots/test_kernel_streaming +++ b/tests/regression/tools/snapshots/test_kernel_streaming @@ -78,7 +78,7 @@ function test_kernel_default_name_with_del() fi stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME return 0 } @@ -94,7 +94,7 @@ function test_kernel_default_name() snapshot_add_output $SESSION_NAME "net://localhost" lttng_snapshot_record $SESSION_NAME stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test validate_trace $EVENT_NAME $TRACE_PATH/$HOSTNAME/snapshot-1* out=$? @@ -116,7 +116,7 @@ function test_kernel_custom_name() snapshot_add_output $SESSION_NAME "net://localhost" $name lttng_snapshot_record $SESSION_NAME stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME if ls $TRACE_PATH/$HOSTNAME/$name* &> /dev/null; then ok 0 "Custom name snapshot exists" diff --git a/tests/regression/tools/snapshots/test_ust_streaming b/tests/regression/tools/snapshots/test_ust_streaming index 4c93cb3db..0ff78fddd 100755 --- a/tests/regression/tools/snapshots/test_ust_streaming +++ b/tests/regression/tools/snapshots/test_ust_streaming @@ -119,7 +119,7 @@ function test_ust_default_name_with_del() fi stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME stop_test_apps @@ -140,7 +140,7 @@ function test_ust_default_name() snapshot_add_output $SESSION_NAME "net://localhost" lttng_snapshot_record $SESSION_NAME stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test validate_trace $EVENT_NAME $TRACE_PATH/$HOSTNAME/snapshot-1* out=$? @@ -163,7 +163,7 @@ function test_ust_default_name_custom_uri() snapshot_add_output $SESSION_NAME "-C tcp://localhost:5342 -D tcp://localhost:5343" lttng_snapshot_record $SESSION_NAME stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test validate_trace $EVENT_NAME $TRACE_PATH/$HOSTNAME/snapshot-1* out=$? @@ -190,7 +190,7 @@ function test_ust_custom_name() snapshot_add_output $SESSION_NAME "net://localhost" $name lttng_snapshot_record $SESSION_NAME stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME if ls $TRACE_PATH/$HOSTNAME/$name* &> /dev/null; then ok 0 "Custom name snapshot exists" diff --git a/tests/regression/tools/snapshots/ust_test b/tests/regression/tools/snapshots/ust_test index 2401794eb..271eb1392 100755 --- a/tests/regression/tools/snapshots/ust_test +++ b/tests/regression/tools/snapshots/ust_test @@ -150,7 +150,7 @@ function test_ust_list_output () ok $? "Snapshot named ${output_names[1]} present in list-output listing" stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME } function test_ust_local_snapshot () @@ -167,7 +167,7 @@ function test_ust_local_snapshot () lttng_snapshot_record $SESSION_NAME stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test validate_trace $EVENT_NAME $TRACE_PATH/ @@ -214,7 +214,7 @@ function test_ust_local_snapshot_max_size () pass "Tracefiles size sum validation" stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test validate_trace $EVENT_NAME $TRACE_PATH/ @@ -244,7 +244,7 @@ function test_ust_local_snapshot_large_metadata () ok $? "Start application to trace" lttng_snapshot_record $SESSION_NAME stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test validate_trace $LM_EVENT $TRACE_PATH/ @@ -277,7 +277,7 @@ function test_ust_per_uid_local_snapshot () lttng_snapshot_record $SESSION_NAME stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test validate_trace $EVENT_NAME $TRACE_PATH/ @@ -304,7 +304,7 @@ function test_ust_per_uid_local_snapshot_post_mortem () lttng_snapshot_record $SESSION_NAME stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test validate_trace $EVENT_NAME $TRACE_PATH/ @@ -338,7 +338,7 @@ function test_ust_local_snapshots () fi done stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME stop_test_apps } diff --git a/tests/regression/tools/streaming/test_high_throughput_limits b/tests/regression/tools/streaming/test_high_throughput_limits index f59ff053d..32c3f1f2b 100755 --- a/tests/regression/tools/streaming/test_high_throughput_limits +++ b/tests/regression/tools/streaming/test_high_throughput_limits @@ -106,7 +106,7 @@ function test_high_throughput wait pass "waiting done" stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME validate_event_count } diff --git a/tests/regression/tools/streaming/test_kernel b/tests/regression/tools/streaming/test_kernel index 68b7247b6..d54bcedf5 100755 --- a/tests/regression/tools/streaming/test_kernel +++ b/tests/regression/tools/streaming/test_kernel @@ -51,7 +51,7 @@ function test_kernel_before_start () # Give a second sleep 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME } # Deactivated since this feature is not yet available where we can enable @@ -65,7 +65,7 @@ function test_kernel_after_start () # Give a second sleep 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME } plan_tests $NUM_TESTS diff --git a/tests/regression/tools/streaming/test_ust b/tests/regression/tools/streaming/test_ust index 44b993355..a5d5b5e92 100755 --- a/tests/regression/tools/streaming/test_ust +++ b/tests/regression/tools/streaming/test_ust @@ -67,7 +67,7 @@ function test_ust_before_start () wait stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -f ${file_sync_after_first} rm -f ${file_sync_before_last} } @@ -89,7 +89,7 @@ function test_ust_after_start () done stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Wait for the applications started in background wait diff --git a/tests/regression/tools/tracefile-limits/test_tracefile_count b/tests/regression/tools/tracefile-limits/test_tracefile_count index 8e2747afa..4fe6ac36e 100755 --- a/tests/regression/tools/tracefile-limits/test_tracefile_count +++ b/tests/regression/tools/tracefile-limits/test_tracefile_count @@ -122,7 +122,7 @@ function test_tracefile_count_limit () stop_lttng_tracing_ok $session_name - destroy_lttng_session $session_name + destroy_lttng_session_ok $session_name # Validate tracing dir diff --git a/tests/regression/tools/tracefile-limits/test_tracefile_size b/tests/regression/tools/tracefile-limits/test_tracefile_size index 0f07d7c91..9fe4637e6 100755 --- a/tests/regression/tools/tracefile-limits/test_tracefile_size +++ b/tests/regression/tools/tracefile-limits/test_tracefile_size @@ -114,7 +114,7 @@ function test_tracefile_size_limit () stop_lttng_tracing_ok $session_name - destroy_lttng_session $session_name + destroy_lttng_session_ok $session_name # Validate file size, each one shall be no larger than the # specified size limit diff --git a/tests/regression/ust/before-after/test_before_after b/tests/regression/ust/before-after/test_before_after index 80b5c76ad..45ef48fc3 100755 --- a/tests/regression/ust/before-after/test_before_after +++ b/tests/regression/ust/before-after/test_before_after @@ -47,7 +47,7 @@ function test_before_apps() ok $? "Traced application stopped." stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH @@ -73,7 +73,7 @@ function test_after_apps() wait stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -f ${file_sync_after_first} rm -f ${file_sync_before_last} diff --git a/tests/regression/ust/buffers-pid/test_buffers_pid b/tests/regression/ust/buffers-pid/test_buffers_pid index fad120ca3..94e6fe45f 100755 --- a/tests/regression/ust/buffers-pid/test_buffers_pid +++ b/tests/regression/ust/buffers-pid/test_buffers_pid @@ -64,7 +64,7 @@ test_after_multiple_apps() { wait stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME trace_match_only $EVENT_NAME $[NR_ITER * 5] $TRACE_PATH @@ -99,7 +99,7 @@ test_before_multiple_apps() { pass "Waiting done" stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME for i in `seq 1 5`; do rm -f ${file_sync_after_first}_${i} @@ -136,7 +136,7 @@ test_after_app() { wait stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH @@ -166,7 +166,7 @@ test_before_app() { wait stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -f ${file_sync_after_first} rm -f ${file_sync_before_last} @@ -218,7 +218,7 @@ test_multiple_channels() { trace_match_only $EVENT_NAME $[NR_ITER * 5] $TRACE_PATH out=$? - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME return $out } diff --git a/tests/regression/ust/high-throughput/test_high_throughput b/tests/regression/ust/high-throughput/test_high_throughput index 89895fd92..10adc8ceb 100755 --- a/tests/regression/ust/high-throughput/test_high_throughput +++ b/tests/regression/ust/high-throughput/test_high_throughput @@ -54,7 +54,7 @@ wait pass "Wait for applications to end" stop_lttng_tracing_ok $SESSION_NAME -destroy_lttng_session $SESSION_NAME +destroy_lttng_session_ok $SESSION_NAME stop_lttng_sessiond diff --git a/tests/regression/ust/java-jul/test_java_jul b/tests/regression/ust/java-jul/test_java_jul index f4114fbe0..48c8b7401 100755 --- a/tests/regression/ust/java-jul/test_java_jul +++ b/tests/regression/ust/java-jul/test_java_jul @@ -108,7 +108,7 @@ function test_jul_before_start () wait stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -f ${file_sync_after_first} rm -f ${file_sync_before_last} @@ -132,7 +132,7 @@ function test_jul_after_start () run_app stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting all events. trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH @@ -153,7 +153,7 @@ function test_jul_loglevel () run_app stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting all events. trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH @@ -171,7 +171,7 @@ function test_jul_loglevel () run_app stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting 0 events. trace_match_only $EVENT_NAME 0 $TRACE_PATH @@ -189,7 +189,7 @@ function test_jul_loglevel () run_app stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting all events. trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH @@ -209,7 +209,7 @@ function test_jul_loglevel_multiple () run_app 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting all events times two. trace_match_only $EVENT_NAME $(($NR_ITER * 2)) $TRACE_PATH @@ -226,7 +226,7 @@ function test_jul_loglevel_multiple () run_app 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting all events times two. trace_match_only $EVENT_NAME $(($NR_ITER * 2)) $TRACE_PATH @@ -252,8 +252,8 @@ function test_jul_multi_session_loglevel() stop_lttng_tracing_ok $SESSION_NAME-1 stop_lttng_tracing_ok $SESSION_NAME-2 - destroy_lttng_session $SESSION_NAME-1 - destroy_lttng_session $SESSION_NAME-2 + destroy_lttng_session_ok $SESSION_NAME-1 + destroy_lttng_session_ok $SESSION_NAME-2 # Expecting 6 events being the main event plus the second tp. trace_match_only $EVENT_NAME $(($NR_ITER + 1)) $TRACE_PATH/$SESSION_NAME-1 @@ -287,8 +287,8 @@ function test_jul_multi_session_disable() stop_lttng_tracing_ok $SESSION_NAME-1 stop_lttng_tracing_ok $SESSION_NAME-2 - destroy_lttng_session $SESSION_NAME-1 - destroy_lttng_session $SESSION_NAME-2 + destroy_lttng_session_ok $SESSION_NAME-1 + destroy_lttng_session_ok $SESSION_NAME-2 # Validate test. Expecting one event of the second TP. trace_match_only $EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME-1 @@ -322,8 +322,8 @@ function test_jul_multi_session_disable_wildcard() stop_lttng_tracing_ok $SESSION_NAME-1 stop_lttng_tracing_ok $SESSION_NAME-2 - destroy_lttng_session $SESSION_NAME-1 - destroy_lttng_session $SESSION_NAME-2 + destroy_lttng_session_ok $SESSION_NAME-1 + destroy_lttng_session_ok $SESSION_NAME-2 # Validate test. Expecting NO event of the first TP. trace_match_only $EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME-1 @@ -354,7 +354,7 @@ function test_jul_disable_all() run_app 0 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting NO event of the first TP and second TP. trace_match_only $EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME @@ -381,8 +381,8 @@ function test_jul_multi_session() stop_lttng_tracing_ok $SESSION_NAME-1 stop_lttng_tracing_ok $SESSION_NAME-2 - destroy_lttng_session $SESSION_NAME-1 - destroy_lttng_session $SESSION_NAME-2 + destroy_lttng_session_ok $SESSION_NAME-1 + destroy_lttng_session_ok $SESSION_NAME-2 # Validate test. Expecting all events of first TP trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-1 @@ -412,7 +412,7 @@ function test_jul_destroy_session() wait stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting at least one event num 1 validate_trace $EVENT_NAME $TRACE_PATH/first-sess @@ -431,7 +431,7 @@ function test_jul_destroy_session() wait stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting only one event num 2 trace_match_only $EVENT_NAME2 1 $TRACE_PATH/second-sess @@ -453,7 +453,7 @@ function test_jul_filtering() run_app 0 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting one event of the second TP only. trace_match_only $EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME @@ -471,7 +471,7 @@ function test_jul_filtering() run_app 1 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting NR_ITER event of the main INFO tp. trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME @@ -495,7 +495,7 @@ function test_jul_disable() run_app 0 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting one event of the second TP only. trace_match_only $EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME @@ -519,7 +519,7 @@ function test_jul_disable_enable() run_app 0 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting NR_ITER event of the main INFO tp. trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME @@ -547,7 +547,7 @@ function test_jul_filter_loglevel() run_app 0 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting no events. trace_match_only $ALL_EVENTS 0 $TRACE_PATH/$SESSION_NAME diff --git a/tests/regression/ust/java-log4j/test_java_log4j b/tests/regression/ust/java-log4j/test_java_log4j index 9fd059447..cdc0c4c34 100755 --- a/tests/regression/ust/java-log4j/test_java_log4j +++ b/tests/regression/ust/java-log4j/test_java_log4j @@ -109,7 +109,7 @@ function test_log4j_before_start () wait stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -f ${file_sync_after_first} rm -f ${file_sync_before_last} @@ -133,7 +133,7 @@ function test_log4j_after_start () run_app stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting all events. trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH @@ -154,7 +154,7 @@ function test_log4j_loglevel () run_app stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting all events. trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH @@ -172,7 +172,7 @@ function test_log4j_loglevel () run_app stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting 0 events. trace_match_only $EVENT_NAME 0 $TRACE_PATH @@ -190,7 +190,7 @@ function test_log4j_loglevel () run_app stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting all events. trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH @@ -210,7 +210,7 @@ function test_log4j_loglevel_multiple () run_app 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting all events times two. trace_match_only $EVENT_NAME $(($NR_ITER * 2)) $TRACE_PATH @@ -227,7 +227,7 @@ function test_log4j_loglevel_multiple () run_app 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting all events times two. trace_match_only $EVENT_NAME $(($NR_ITER * 2)) $TRACE_PATH @@ -253,8 +253,8 @@ function test_log4j_multi_session_loglevel() stop_lttng_tracing_ok $SESSION_NAME-1 stop_lttng_tracing_ok $SESSION_NAME-2 - destroy_lttng_session $SESSION_NAME-1 - destroy_lttng_session $SESSION_NAME-2 + destroy_lttng_session_ok $SESSION_NAME-1 + destroy_lttng_session_ok $SESSION_NAME-2 # Expecting 6 events being the main event plus the second tp. trace_match_only $EVENT_NAME $(($NR_ITER + 1)) $TRACE_PATH/$SESSION_NAME-1 @@ -288,8 +288,8 @@ function test_log4j_multi_session_disable() stop_lttng_tracing_ok $SESSION_NAME-1 stop_lttng_tracing_ok $SESSION_NAME-2 - destroy_lttng_session $SESSION_NAME-1 - destroy_lttng_session $SESSION_NAME-2 + destroy_lttng_session_ok $SESSION_NAME-1 + destroy_lttng_session_ok $SESSION_NAME-2 # Validate test. Expecting one event of the second TP. trace_match_only $EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME-1 @@ -323,8 +323,8 @@ function test_log4j_multi_session_disable_wildcard() stop_lttng_tracing_ok $SESSION_NAME-1 stop_lttng_tracing_ok $SESSION_NAME-2 - destroy_lttng_session $SESSION_NAME-1 - destroy_lttng_session $SESSION_NAME-2 + destroy_lttng_session_ok $SESSION_NAME-1 + destroy_lttng_session_ok $SESSION_NAME-2 # Validate test. Expecting NO event of the first TP. trace_match_only $EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME-1 @@ -355,7 +355,7 @@ function test_log4j_disable_all() run_app 0 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting NO event of the first TP and second TP. trace_match_only $EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME @@ -382,8 +382,8 @@ function test_log4j_multi_session() stop_lttng_tracing_ok $SESSION_NAME-1 stop_lttng_tracing_ok $SESSION_NAME-2 - destroy_lttng_session $SESSION_NAME-1 - destroy_lttng_session $SESSION_NAME-2 + destroy_lttng_session_ok $SESSION_NAME-1 + destroy_lttng_session_ok $SESSION_NAME-2 # Validate test. Expecting all events of first TP trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-1 @@ -412,7 +412,7 @@ function test_log4j_destroy_session() wait stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting at least one event num 1 validate_trace $EVENT_NAME $TRACE_PATH/first-sess @@ -430,7 +430,7 @@ function test_log4j_destroy_session() wait stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting only one event num 2 trace_match_only $EVENT_NAME2 1 $TRACE_PATH/second-sess @@ -452,7 +452,7 @@ function test_log4j_filtering() run_app 0 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting one event of the second TP only. trace_match_only $EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME @@ -470,7 +470,7 @@ function test_log4j_filtering() run_app 1 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting NR_ITER event of the main INFO tp. trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME @@ -494,7 +494,7 @@ function test_log4j_disable() run_app 0 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting one event of the second TP only. trace_match_only $EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME @@ -518,7 +518,7 @@ function test_log4j_disable_enable() run_app 0 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting NR_ITER event of the main INFO tp. trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME @@ -546,7 +546,7 @@ function test_log4j_filter_loglevel() run_app 0 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting no events. trace_match_only $ALL_EVENTS 0 $TRACE_PATH/$SESSION_NAME diff --git a/tests/regression/ust/low-throughput/test_low_throughput b/tests/regression/ust/low-throughput/test_low_throughput index a1948aa47..4820485f7 100755 --- a/tests/regression/ust/low-throughput/test_low_throughput +++ b/tests/regression/ust/low-throughput/test_low_throughput @@ -48,7 +48,7 @@ start_lttng_tracing_ok $SESSION_NAME ./$CURDIR/$BIN_NAME >/dev/null 2>&1 stop_lttng_tracing_ok $SESSION_NAME -destroy_lttng_session $SESSION_NAME +destroy_lttng_session_ok $SESSION_NAME stop_lttng_sessiond diff --git a/tests/regression/ust/multi-session/test_multi_session b/tests/regression/ust/multi-session/test_multi_session index 45da8d204..33b296bcf 100755 --- a/tests/regression/ust/multi-session/test_multi_session +++ b/tests/regression/ust/multi-session/test_multi_session @@ -49,7 +49,7 @@ test_multi_session() { for i in `seq 0 3`; do stop_lttng_tracing_ok "$SESSION_NAME-$i" - destroy_lttng_session "$SESSION_NAME-$i" + destroy_lttng_session_ok "$SESSION_NAME-$i" out=$(babeltrace "$TRACE_PATH/$i" | grep "$EVENT_NAMEi$i" | wc -l) if [ $out -ne $NR_ITER ]; then fail "Trace validation of $SESSION_NAME-$i" diff --git a/tests/regression/ust/nprocesses/test_nprocesses b/tests/regression/ust/nprocesses/test_nprocesses index 40da06839..7677cc6cc 100755 --- a/tests/regression/ust/nprocesses/test_nprocesses +++ b/tests/regression/ust/nprocesses/test_nprocesses @@ -79,7 +79,7 @@ touch ${file_sync_before_last} # just that they registered to sessiond (above). stop_lttng_tracing_ok $SESSION_NAME -destroy_lttng_session $SESSION_NAME +destroy_lttng_session_ok $SESSION_NAME #TODO: add trace validation. diff --git a/tests/regression/ust/overlap/test_overlap b/tests/regression/ust/overlap/test_overlap index 7a39332af..69d6c66d2 100755 --- a/tests/regression/ust/overlap/test_overlap +++ b/tests/regression/ust/overlap/test_overlap @@ -656,7 +656,7 @@ while [ "$i" -lt "$TEST_COUNT" ]; do # Execute test ${TESTS[$i]} - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH diff --git a/tests/regression/ust/periodical-metadata-flush/test_periodical_metadata_flush b/tests/regression/ust/periodical-metadata-flush/test_periodical_metadata_flush index 25b93ec9e..ea6b93838 100755 --- a/tests/regression/ust/periodical-metadata-flush/test_periodical_metadata_flush +++ b/tests/regression/ust/periodical-metadata-flush/test_periodical_metadata_flush @@ -162,7 +162,7 @@ test_after_app_pid() { wait ${p} 2>/dev/null done stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME wait_trace_apps @@ -209,7 +209,7 @@ test_before_app_pid() { done stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME wait_trace_apps @@ -252,7 +252,7 @@ test_after_app_uid() { wait ${p} 2>/dev/null done stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME wait_trace_apps @@ -297,7 +297,7 @@ test_before_app_uid() { wait ${p} 2>/dev/null done stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME wait_trace_apps diff --git a/tests/regression/ust/python-logging/test_python_logging b/tests/regression/ust/python-logging/test_python_logging index 5917b9fff..e88c27f86 100755 --- a/tests/regression/ust/python-logging/test_python_logging +++ b/tests/regression/ust/python-logging/test_python_logging @@ -102,7 +102,7 @@ function test_python_before_start () wait stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting all events. trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH @@ -123,7 +123,7 @@ function test_python_after_start () run_app stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting all events. trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH @@ -144,7 +144,7 @@ function test_python_loglevel () run_app stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting all events. trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH @@ -162,7 +162,7 @@ function test_python_loglevel () run_app stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting 0 events. trace_match_only $EVENT_NAME 0 $TRACE_PATH @@ -180,7 +180,7 @@ function test_python_loglevel () run_app stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting all events. trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH @@ -200,7 +200,7 @@ function test_python_loglevel_multiple () run_app 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting all events times two. trace_match_only $EVENT_NAME $(($NR_ITER * 2)) $TRACE_PATH @@ -217,7 +217,7 @@ function test_python_loglevel_multiple () run_app 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting all events times two. trace_match_only $EVENT_NAME $(($NR_ITER * 2)) $TRACE_PATH @@ -243,8 +243,8 @@ function test_python_multi_session_loglevel() stop_lttng_tracing_ok $SESSION_NAME-1 stop_lttng_tracing_ok $SESSION_NAME-2 - destroy_lttng_session $SESSION_NAME-1 - destroy_lttng_session $SESSION_NAME-2 + destroy_lttng_session_ok $SESSION_NAME-1 + destroy_lttng_session_ok $SESSION_NAME-2 # Expecting NR_ITER events being the main event and the second tp one. trace_matches $EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-1 @@ -282,8 +282,8 @@ function test_python_multi_session_disable() stop_lttng_tracing_ok $SESSION_NAME-1 stop_lttng_tracing_ok $SESSION_NAME-2 - destroy_lttng_session $SESSION_NAME-1 - destroy_lttng_session $SESSION_NAME-2 + destroy_lttng_session_ok $SESSION_NAME-1 + destroy_lttng_session_ok $SESSION_NAME-2 # Validate test. Expecting one event of the second TP. trace_match_only $EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME-1 @@ -317,8 +317,8 @@ function test_python_multi_session_disable_wildcard() stop_lttng_tracing_ok $SESSION_NAME-1 stop_lttng_tracing_ok $SESSION_NAME-2 - destroy_lttng_session $SESSION_NAME-1 - destroy_lttng_session $SESSION_NAME-2 + destroy_lttng_session_ok $SESSION_NAME-1 + destroy_lttng_session_ok $SESSION_NAME-2 # Validate test. Expecting NO event of the first TP. trace_match_only $EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME-1 @@ -349,7 +349,7 @@ function test_python_disable_all() run_app 0 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting NO event of the first TP and second TP. trace_match_only $EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME @@ -376,8 +376,8 @@ function test_python_multi_session() stop_lttng_tracing_ok $SESSION_NAME-1 stop_lttng_tracing_ok $SESSION_NAME-2 - destroy_lttng_session $SESSION_NAME-1 - destroy_lttng_session $SESSION_NAME-2 + destroy_lttng_session_ok $SESSION_NAME-1 + destroy_lttng_session_ok $SESSION_NAME-2 # Validate test. Expecting all events of first TP trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-1 @@ -407,7 +407,7 @@ function test_python_destroy_session() wait stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting at least one event num 1 validate_trace $EVENT_NAME $TRACE_PATH/first-sess @@ -426,7 +426,7 @@ function test_python_destroy_session() wait stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting only one event num 2 trace_match_only $EVENT_NAME2 1 $TRACE_PATH/second-sess @@ -448,7 +448,7 @@ function test_python_filtering() run_app 0 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting one event of the second TP only. trace_match_only $EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME @@ -466,7 +466,7 @@ function test_python_filtering() run_app 1 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting NR_ITER event of the main INFO tp. trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME @@ -490,7 +490,7 @@ function test_python_disable() run_app 0 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting one event of the second TP only. trace_match_only $EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME @@ -514,7 +514,7 @@ function test_python_disable_enable() run_app 0 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting NR_ITER event of the main INFO tp. trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME @@ -542,7 +542,7 @@ function test_python_filter_loglevel() run_app 0 1 stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME # Validate test. Expecting no events. trace_match_only $ALL_EVENTS 0 $TRACE_PATH/$SESSION_NAME diff --git a/tests/regression/ust/test_event_basic b/tests/regression/ust/test_event_basic index df86d2914..31931a977 100755 --- a/tests/regression/ust/test_event_basic +++ b/tests/regression/ust/test_event_basic @@ -100,8 +100,8 @@ function test_event_basic() ok 0 "Validate trace" unset TODO - destroy_lttng_session $SESSION_NAME2 - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME2 + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } diff --git a/tests/regression/ust/test_event_perf b/tests/regression/ust/test_event_perf index 8bdff2c7b..7fb37edfe 100755 --- a/tests/regression/ust/test_event_perf +++ b/tests/regression/ust/test_event_perf @@ -72,7 +72,7 @@ function test_event_basic() stop_lttng_tracing_ok - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME validate_trace "perf_thread_page_fault" $TRACE_PATH rm -rf $TRACE_PATH diff --git a/tests/regression/ust/test_event_tracef b/tests/regression/ust/test_event_tracef index a3344227f..1aa2ff426 100755 --- a/tests/regression/ust/test_event_tracef +++ b/tests/regression/ust/test_event_tracef @@ -45,7 +45,7 @@ function test_event_tracef() ok $? "Traced application stopped." stop_lttng_tracing_ok $SESSION_NAME - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH diff --git a/tests/regression/ust/test_event_wildcard b/tests/regression/ust/test_event_wildcard index 2cb562f0f..1c0b27a65 100755 --- a/tests/regression/ust/test_event_wildcard +++ b/tests/regression/ust/test_event_wildcard @@ -49,7 +49,7 @@ function test_event_wildcard() ok 0 "Validate trace" unset TODO - destroy_lttng_session $SESSION_NAME + destroy_lttng_session_ok $SESSION_NAME rm -rf $TRACE_PATH } diff --git a/tests/stress/test_multi_sessions_per_uid_10app b/tests/stress/test_multi_sessions_per_uid_10app index 97ccab2d5..c25e303b0 100755 --- a/tests/stress/test_multi_sessions_per_uid_10app +++ b/tests/stress/test_multi_sessions_per_uid_10app @@ -91,7 +91,7 @@ test_stress() for a in $(seq 1 $NR_SESSION); do stop_lttng_tracing_ok $SESSION_NAME-$a check_sessiond - destroy_lttng_session $SESSION_NAME-$a + destroy_lttng_session_ok $SESSION_NAME-$a check_sessiond done done diff --git a/tests/stress/test_multi_sessions_per_uid_5app_streaming b/tests/stress/test_multi_sessions_per_uid_5app_streaming index 1eafbd84c..760e2222e 100755 --- a/tests/stress/test_multi_sessions_per_uid_5app_streaming +++ b/tests/stress/test_multi_sessions_per_uid_5app_streaming @@ -129,7 +129,7 @@ test_stress() stop_lttng_tracing_ok $SESSION_NAME-$a check_sessiond check_relayd - destroy_lttng_session $SESSION_NAME-$a + destroy_lttng_session_ok $SESSION_NAME-$a check_sessiond check_relayd done diff --git a/tests/stress/test_multi_sessions_per_uid_5app_streaming_kill_relayd b/tests/stress/test_multi_sessions_per_uid_5app_streaming_kill_relayd index 60d7071f8..3b26ba7a8 100755 --- a/tests/stress/test_multi_sessions_per_uid_5app_streaming_kill_relayd +++ b/tests/stress/test_multi_sessions_per_uid_5app_streaming_kill_relayd @@ -131,7 +131,7 @@ test_stress() stop_lttng_tracing_ok $SESSION_NAME-$a check_sessiond check_relayd - destroy_lttng_session $SESSION_NAME-$a + destroy_lttng_session_ok $SESSION_NAME-$a check_sessiond check_relayd done diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index 067a4f532..454627eaa 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -711,8 +711,8 @@ function stop_lttng_tracing_fail () function destroy_lttng_session () { - local sess_name=$1 - local expected_to_fail=$2 + local expected_to_fail=$1 + local sess_name=$2 $TESTDIR/../src/bin/lttng/$LTTNG_BIN destroy $sess_name >$OUTPUT_DEST ret=$? @@ -724,6 +724,18 @@ function destroy_lttng_session () fi } +function destroy_lttng_session_ok () +{ + destroy_lttng_session 0 "$@" + +} + +function destroy_lttng_session_fail () +{ + destroy_lttng_session 1 "$@" +} + + function destroy_lttng_sessions () { $TESTDIR/../src/bin/lttng/$LTTNG_BIN destroy --all >$OUTPUT_DEST -- 2.34.1