From: Jonathan Rajotte Date: Fri, 24 Apr 2015 20:10:08 +0000 (-0400) Subject: Refactor: test: wrapper for stop_lttng_tracing X-Git-Tag: v2.7.0-rc1~20 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=96340a015194538227efcbc654ec02c2ed9961ce;p=lttng-tools.git Refactor: test: wrapper for stop_lttng_tracing Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- diff --git a/tests/regression/kernel/test_all_events b/tests/regression/kernel/test_all_events index 444f0853e..9ea847b48 100755 --- a/tests/regression/kernel/test_all_events +++ b/tests/regression/kernel/test_all_events @@ -33,7 +33,7 @@ function test_all_event() lttng_enable_kernel_event $SESSION_NAME start_lttng_tracing_ok - stop_lttng_tracing + stop_lttng_tracing_ok validate_trace "sched_switch" $TRACE_PATH diff --git a/tests/regression/kernel/test_event_basic b/tests/regression/kernel/test_event_basic index 3c5f91d0f..c57858af4 100755 --- a/tests/regression/kernel/test_event_basic +++ b/tests/regression/kernel/test_event_basic @@ -35,7 +35,7 @@ function test_event_basic() lttng_enable_kernel_event $SESSION_NAME "sched_process_free" start_lttng_tracing_ok - stop_lttng_tracing + stop_lttng_tracing_ok validate_trace "sched_switch" $TRACE_PATH validate_trace "sched_process_exit" $TRACE_PATH @@ -57,7 +57,7 @@ function test_enable_after_start() start_lttng_tracing_ok lttng_enable_kernel_event $SESSION_NAME "sched_process_exit" - stop_lttng_tracing + stop_lttng_tracing_ok validate_trace "sched_switch" $TRACE_PATH validate_trace "sched_process_exit" $TRACE_PATH diff --git a/tests/regression/kernel/test_syscall b/tests/regression/kernel/test_syscall index fd1593d9d..95f612455 100755 --- a/tests/regression/kernel/test_syscall +++ b/tests/regression/kernel/test_syscall @@ -67,7 +67,7 @@ function test_syscall_simple_list() start_lttng_tracing_ok eval ${TESTCMD} - stop_lttng_tracing + stop_lttng_tracing_ok # ensure each is there. validate_trace_exp "-e syscall_entry_$EVENT_NAME: -e compat_syscall_entry_$EVENT_NAME:" $TRACE_PATH @@ -100,7 +100,7 @@ function test_syscall_simple_list_two() start_lttng_tracing_ok eval ${TESTCMD} - stop_lttng_tracing + stop_lttng_tracing_ok # ensure each is there. validate_trace_exp "-e syscall_entry_$EVENT_NAME: -e compat_syscall_entry_$EVENT_NAME:" $TRACE_PATH @@ -131,7 +131,7 @@ function test_syscall_single() start_lttng_tracing_ok eval ${TESTCMD} - stop_lttng_tracing + stop_lttng_tracing_ok # ensure each is there. validate_trace_exp "-e syscall_entry_open: -e compat_syscall_entry_open:" $TRACE_PATH @@ -159,7 +159,7 @@ function test_syscall_two() start_lttng_tracing_ok eval ${TESTCMD} - stop_lttng_tracing + stop_lttng_tracing_ok # ensure each is there. validate_trace_exp "-e syscall_entry_open: -e compat_syscall_entry_open:" $TRACE_PATH @@ -189,7 +189,7 @@ function test_syscall_all() start_lttng_tracing_ok eval ${TESTCMD} - stop_lttng_tracing + stop_lttng_tracing_ok # ensure at least open and close are there. validate_trace_exp "-e syscall_entry_open: -e compat_syscall_entry_open:" $TRACE_PATH @@ -220,7 +220,7 @@ function test_syscall_all_disable_one() start_lttng_tracing_ok eval ${TESTCMD} - stop_lttng_tracing + stop_lttng_tracing_ok # ensure "open" syscall is there. validate_trace_exp "-e syscall_entry_open: -e compat_syscall_entry_open: -e syscall_exit_open: -e compat_syscall_exit_open:" $TRACE_PATH @@ -253,7 +253,7 @@ function test_syscall_all_disable_two() start_lttng_tracing_ok # generates open, close, execve (at least) eval ${TESTCMD} - stop_lttng_tracing + stop_lttng_tracing_ok # ensure "open" syscall is there. validate_trace_exp "-e syscall_entry_open: -e compat_syscall_entry_open: -e syscall_exit_open: -e compat_syscall_exit_open:" $TRACE_PATH @@ -288,7 +288,7 @@ function test_syscall_enable_all_disable_all() start_lttng_tracing_ok # generates open, close, execve (at least) eval ${TESTCMD} - stop_lttng_tracing + stop_lttng_tracing_ok # ensure nothing has been traced. validate_trace_empty $TRACE_PATH @@ -317,7 +317,7 @@ function test_syscall_enable_all_disable_all_enable_all() start_lttng_tracing_ok # generates open, close, execve (at least) eval ${TESTCMD} - stop_lttng_tracing + stop_lttng_tracing_ok # ensure at least open and close are there. validate_trace_exp "-e syscall_entry_open: -e compat_syscall_entry_open:" $TRACE_PATH @@ -352,7 +352,7 @@ function test_syscall_enable_all_disable_all_twice() start_lttng_tracing_ok # generates open, close, execve (at least) eval ${TESTCMD} - stop_lttng_tracing + stop_lttng_tracing_ok # ensure nothing has been traced. validate_trace_empty $TRACE_PATH @@ -379,7 +379,7 @@ function test_syscall_enable_one_disable_one() start_lttng_tracing_ok # generates open, close, execve (at least) eval ${TESTCMD} - stop_lttng_tracing + stop_lttng_tracing_ok # ensure nothing has been traced. validate_trace_empty $TRACE_PATH @@ -408,7 +408,7 @@ function test_syscall_enable_two_disable_two() start_lttng_tracing_ok # generates open, close, execve (at least) eval ${TESTCMD} - stop_lttng_tracing + stop_lttng_tracing_ok # ensure nothing has been traced. validate_trace_empty $TRACE_PATH @@ -436,7 +436,7 @@ function test_syscall_enable_two_disable_one() start_lttng_tracing_ok # generates open, close, execve (at least) eval ${TESTCMD} - stop_lttng_tracing + stop_lttng_tracing_ok # ensure open is there. validate_trace_exp "-e syscall_entry_open: -e compat_syscall_entry_open:" $TRACE_PATH diff --git a/tests/regression/tools/exclusion/test_exclusion b/tests/regression/tools/exclusion/test_exclusion index 6ff8c210f..0033c7ed5 100755 --- a/tests/regression/tools/exclusion/test_exclusion +++ b/tests/regression/tools/exclusion/test_exclusion @@ -59,7 +59,7 @@ function test_exclusion # Trace apps start_lttng_tracing_ok $SESSION_NAME run_apps - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME # Destroy session destroy_lttng_session $SESSION_NAME diff --git a/tests/regression/tools/filtering/test_valid_filter b/tests/regression/tools/filtering/test_valid_filter index 9a9e31c83..42f32e705 100755 --- a/tests/regression/tools/filtering/test_valid_filter +++ b/tests/regression/tools/filtering/test_valid_filter @@ -67,7 +67,7 @@ function test_valid_filter # Trace apps start_lttng_tracing_ok $SESSION_NAME run_apps - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME # Destroy session destroy_lttng_session $SESSION_NAME diff --git a/tests/regression/tools/live/test_lttng_kernel b/tests/regression/tools/live/test_lttng_kernel index d55eab61f..084649f9b 100755 --- a/tests/regression/tools/live/test_lttng_kernel +++ b/tests/regression/tools/live/test_lttng_kernel @@ -54,7 +54,7 @@ function setup_live_tracing() function clean_live_tracing() { - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME } diff --git a/tests/regression/tools/live/test_lttng_ust b/tests/regression/tools/live/test_lttng_ust index b1d5c2931..bf66603f6 100755 --- a/tests/regression/tools/live/test_lttng_ust +++ b/tests/regression/tools/live/test_lttng_ust @@ -68,7 +68,7 @@ function setup_live_tracing() function clean_live_tracing() { - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME } diff --git a/tests/regression/tools/mi/test_mi b/tests/regression/tools/mi/test_mi index 4c71fd830..5d2d4513f 100755 --- a/tests/regression/tools/mi/test_mi +++ b/tests/regression/tools/mi/test_mi @@ -580,7 +580,7 @@ function test_start_stop () { ok $? "Mi test: enabled element : $result expected: true" #Test stop command - stop_lttng_tracing $session_name + stop_lttng_tracing_ok $session_name $XML_VALIDATE $OUTPUT_DEST ok $? "Mi test: stop xsd validation" @@ -595,7 +595,7 @@ function test_start_stop () { ok $? "Mi test: enabled element : $result expected: false" #Test failing stop command - stop_lttng_tracing $session_name 1 + stop_lttng_tracing_fail $session_name $XML_VALIDATE $OUTPUT_DEST ok $? "Mi test: failed stop xsd validation" diff --git a/tests/regression/tools/snapshots/test_kernel b/tests/regression/tools/snapshots/test_kernel index 61e5a7c0e..b4c7f9146 100755 --- a/tests/regression/tools/snapshots/test_kernel +++ b/tests/regression/tools/snapshots/test_kernel @@ -44,7 +44,7 @@ function test_kernel_local_snapshot () start_lttng_tracing_ok $SESSION_NAME lttng_snapshot_add_output $SESSION_NAME $TRACE_PATH lttng_snapshot_record $SESSION_NAME - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test @@ -64,7 +64,7 @@ function test_kernel_local_snapshot_after_stop () enable_lttng_mmap_overwrite_kernel_channel $SESSION_NAME $CHANNEL_NAME lttng_enable_kernel_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME start_lttng_tracing_ok $SESSION_NAME - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME lttng_snapshot_add_output $SESSION_NAME $TRACE_PATH lttng_snapshot_record $SESSION_NAME destroy_lttng_session $SESSION_NAME @@ -114,7 +114,7 @@ function test_kernel_local_snapshot_append_to_metadata () break fi - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME } @@ -141,7 +141,7 @@ function test_kernel_1000_local_snapshots () break fi done - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME } diff --git a/tests/regression/tools/snapshots/test_kernel_streaming b/tests/regression/tools/snapshots/test_kernel_streaming index 233285743..e37b8d464 100755 --- a/tests/regression/tools/snapshots/test_kernel_streaming +++ b/tests/regression/tools/snapshots/test_kernel_streaming @@ -77,7 +77,7 @@ function test_kernel_default_name_with_del() return $? fi - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME return 0 @@ -93,7 +93,7 @@ function test_kernel_default_name() start_lttng_tracing_ok $SESSION_NAME snapshot_add_output $SESSION_NAME "net://localhost" lttng_snapshot_record $SESSION_NAME - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test validate_trace $EVENT_NAME $TRACE_PATH/$HOSTNAME/snapshot-1* @@ -115,7 +115,7 @@ function test_kernel_custom_name() start_lttng_tracing_ok $SESSION_NAME snapshot_add_output $SESSION_NAME "net://localhost" $name lttng_snapshot_record $SESSION_NAME - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME if ls $TRACE_PATH/$HOSTNAME/$name* &> /dev/null; then diff --git a/tests/regression/tools/snapshots/test_ust_streaming b/tests/regression/tools/snapshots/test_ust_streaming index 4dcac4a16..4c93cb3db 100755 --- a/tests/regression/tools/snapshots/test_ust_streaming +++ b/tests/regression/tools/snapshots/test_ust_streaming @@ -118,7 +118,7 @@ function test_ust_default_name_with_del() return $? fi - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME stop_test_apps @@ -139,7 +139,7 @@ function test_ust_default_name() snapshot_add_output $SESSION_NAME "net://localhost" lttng_snapshot_record $SESSION_NAME - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test validate_trace $EVENT_NAME $TRACE_PATH/$HOSTNAME/snapshot-1* @@ -162,7 +162,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 $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test validate_trace $EVENT_NAME $TRACE_PATH/$HOSTNAME/snapshot-1* @@ -189,7 +189,7 @@ function test_ust_custom_name() snapshot_add_output $SESSION_NAME "net://localhost" $name lttng_snapshot_record $SESSION_NAME - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME if ls $TRACE_PATH/$HOSTNAME/$name* &> /dev/null; then diff --git a/tests/regression/tools/snapshots/ust_test b/tests/regression/tools/snapshots/ust_test index 815a7f2b4..2401794eb 100755 --- a/tests/regression/tools/snapshots/ust_test +++ b/tests/regression/tools/snapshots/ust_test @@ -149,7 +149,7 @@ function test_ust_list_output () ok $? "Snapshot named ${output_names[1]} present in list-output listing" - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME } @@ -166,7 +166,7 @@ function test_ust_local_snapshot () start_test_app lttng_snapshot_record $SESSION_NAME - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test @@ -213,7 +213,7 @@ function test_ust_local_snapshot_max_size () pass "Tracefiles size sum validation" - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test @@ -243,7 +243,7 @@ function test_ust_local_snapshot_large_metadata () $LM_BIN 1 1 ok $? "Start application to trace" lttng_snapshot_record $SESSION_NAME - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test @@ -276,7 +276,7 @@ function test_ust_per_uid_local_snapshot () start_test_app lttng_snapshot_record $SESSION_NAME - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test @@ -303,7 +303,7 @@ function test_ust_per_uid_local_snapshot_post_mortem () stop_test_apps lttng_snapshot_record $SESSION_NAME - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test @@ -337,7 +337,7 @@ function test_ust_local_snapshots () rm -rf $TRACE_PATH fi done - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $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 4a9152486..f59ff053d 100755 --- a/tests/regression/tools/streaming/test_high_throughput_limits +++ b/tests/regression/tools/streaming/test_high_throughput_limits @@ -105,7 +105,7 @@ function test_high_throughput diag "Waiting for applications to end" wait pass "waiting done" - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME validate_event_count } diff --git a/tests/regression/tools/streaming/test_kernel b/tests/regression/tools/streaming/test_kernel index 5718201b8..68b7247b6 100755 --- a/tests/regression/tools/streaming/test_kernel +++ b/tests/regression/tools/streaming/test_kernel @@ -50,7 +50,7 @@ function test_kernel_before_start () start_lttng_tracing_ok $SESSION_NAME # Give a second sleep 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME } @@ -64,7 +64,7 @@ function test_kernel_after_start () lttng_enable_kernel_event $SESSION_NAME $EVENT_NAME # Give a second sleep 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME } diff --git a/tests/regression/tools/streaming/test_ust b/tests/regression/tools/streaming/test_ust index 68d92947c..44b993355 100755 --- a/tests/regression/tools/streaming/test_ust +++ b/tests/regression/tools/streaming/test_ust @@ -66,7 +66,7 @@ function test_ust_before_start () # Wait for the applications started in background wait - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME rm -f ${file_sync_after_first} rm -f ${file_sync_before_last} @@ -88,7 +88,7 @@ function test_ust_after_start () sleep 0.5 done - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Wait for the applications started in background diff --git a/tests/regression/tools/tracefile-limits/test_tracefile_count b/tests/regression/tools/tracefile-limits/test_tracefile_count index 91e2136c9..8e2747afa 100755 --- a/tests/regression/tools/tracefile-limits/test_tracefile_count +++ b/tests/regression/tools/tracefile-limits/test_tracefile_count @@ -120,7 +120,7 @@ function test_tracefile_count_limit () $TESTAPP_BIN $num_iter >/dev/null 2>&1 - stop_lttng_tracing $session_name + stop_lttng_tracing_ok $session_name destroy_lttng_session $session_name diff --git a/tests/regression/tools/tracefile-limits/test_tracefile_size b/tests/regression/tools/tracefile-limits/test_tracefile_size index 9fa772eb2..0f07d7c91 100755 --- a/tests/regression/tools/tracefile-limits/test_tracefile_size +++ b/tests/regression/tools/tracefile-limits/test_tracefile_size @@ -112,7 +112,7 @@ function test_tracefile_size_limit () $TESTAPP_BIN $NR_ITER >/dev/null 2>&1 - stop_lttng_tracing $session_name + stop_lttng_tracing_ok $session_name destroy_lttng_session $session_name diff --git a/tests/regression/ust/before-after/test_before_after b/tests/regression/ust/before-after/test_before_after index 1ab94a724..80b5c76ad 100755 --- a/tests/regression/ust/before-after/test_before_after +++ b/tests/regression/ust/before-after/test_before_after @@ -46,7 +46,7 @@ function test_before_apps() wait ok $? "Traced application stopped." - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH @@ -72,7 +72,7 @@ function test_after_apps() wait - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME rm -f ${file_sync_after_first} diff --git a/tests/regression/ust/buffers-pid/test_buffers_pid b/tests/regression/ust/buffers-pid/test_buffers_pid index d21e8c34a..fad120ca3 100755 --- a/tests/regression/ust/buffers-pid/test_buffers_pid +++ b/tests/regression/ust/buffers-pid/test_buffers_pid @@ -63,7 +63,7 @@ test_after_multiple_apps() { done wait - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME trace_match_only $EVENT_NAME $[NR_ITER * 5] $TRACE_PATH @@ -98,7 +98,7 @@ test_before_multiple_apps() { wait pass "Waiting done" - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME for i in `seq 1 5`; do @@ -135,7 +135,7 @@ test_after_app() { ok $? "Start application to trace" wait - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME trace_match_only $EVENT_NAME $NR_ITER $TRACE_PATH @@ -165,7 +165,7 @@ test_before_app() { wait - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME rm -f ${file_sync_after_first} @@ -214,7 +214,7 @@ test_multiple_channels() { ok $? "Start application to trace" wait - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_only $EVENT_NAME $[NR_ITER * 5] $TRACE_PATH out=$? diff --git a/tests/regression/ust/high-throughput/test_high_throughput b/tests/regression/ust/high-throughput/test_high_throughput index c236e5aaf..89895fd92 100755 --- a/tests/regression/ust/high-throughput/test_high_throughput +++ b/tests/regression/ust/high-throughput/test_high_throughput @@ -53,7 +53,7 @@ diag "Waiting for applications to end" wait pass "Wait for applications to end" -stop_lttng_tracing $SESSION_NAME +stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $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 03b6e2da9..f4114fbe0 100755 --- a/tests/regression/ust/java-jul/test_java_jul +++ b/tests/regression/ust/java-jul/test_java_jul @@ -107,7 +107,7 @@ function test_jul_before_start () # Wait for the applications started in background wait - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME rm -f ${file_sync_after_first} @@ -131,7 +131,7 @@ function test_jul_after_start () # Run 5 times with a 1 second delay run_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting all events. @@ -152,7 +152,7 @@ function test_jul_loglevel () # Run 5 times with a 1 second delay run_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting all events. @@ -170,7 +170,7 @@ function test_jul_loglevel () # Run 5 times with a 1 second delay run_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting 0 events. @@ -188,7 +188,7 @@ function test_jul_loglevel () # Run 5 times with a 1 second delay run_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting all events. @@ -208,7 +208,7 @@ function test_jul_loglevel_multiple () # Run 5 times with a 1 second delay and fire two TP. run_app 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting all events times two. @@ -225,7 +225,7 @@ function test_jul_loglevel_multiple () # Run 5 times with a 1 second delay and fire two TP. run_app 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting all events times two. @@ -250,8 +250,8 @@ function test_jul_multi_session_loglevel() # Run 5 times with a 1 second delay and fire second TP. run_app 1 1 - stop_lttng_tracing $SESSION_NAME-1 - stop_lttng_tracing $SESSION_NAME-2 + 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 @@ -285,8 +285,8 @@ function test_jul_multi_session_disable() # Run 5 times with a 1 second delay and fire second TP. run_app 0 1 - stop_lttng_tracing $SESSION_NAME-1 - stop_lttng_tracing $SESSION_NAME-2 + 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 @@ -320,8 +320,8 @@ function test_jul_multi_session_disable_wildcard() run_app - stop_lttng_tracing $SESSION_NAME-1 - stop_lttng_tracing $SESSION_NAME-2 + 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 @@ -353,7 +353,7 @@ function test_jul_disable_all() run_app 0 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting NO event of the first TP and second TP. @@ -379,8 +379,8 @@ function test_jul_multi_session() # Run 5 times with a 1 second delay and fire second TP. run_app 0 1 - stop_lttng_tracing $SESSION_NAME-1 - stop_lttng_tracing $SESSION_NAME-2 + 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 @@ -411,7 +411,7 @@ function test_jul_destroy_session() # Wait for the applications started in background wait - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting at least one event num 1 @@ -430,7 +430,7 @@ function test_jul_destroy_session() # Wait for the applications started in background wait - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting only one event num 2 @@ -452,7 +452,7 @@ function test_jul_filtering() # Run 5 times with a 1 second delay and fire second TP. run_app 0 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting one event of the second TP only. @@ -470,7 +470,7 @@ function test_jul_filtering() # Run 5 times with a 1 second delay, fire finest and second TP. run_app 1 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting NR_ITER event of the main INFO tp. @@ -494,7 +494,7 @@ function test_jul_disable() # Run 5 times with a 1 second delay and fire second TP. run_app 0 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting one event of the second TP only. @@ -518,7 +518,7 @@ function test_jul_disable_enable() # Run 5 times with a 1 second delay and fire second TP. run_app 0 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting NR_ITER event of the main INFO tp. @@ -546,7 +546,7 @@ function test_jul_filter_loglevel() # Run 5 times with a 1 second delay and fire second TP. run_app 0 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting no events. diff --git a/tests/regression/ust/java-log4j/test_java_log4j b/tests/regression/ust/java-log4j/test_java_log4j index 6abc12fe3..9fd059447 100755 --- a/tests/regression/ust/java-log4j/test_java_log4j +++ b/tests/regression/ust/java-log4j/test_java_log4j @@ -108,7 +108,7 @@ function test_log4j_before_start () # Wait for the applications started in background wait - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME rm -f ${file_sync_after_first} @@ -132,7 +132,7 @@ function test_log4j_after_start () # Run 5 times with a 1 second delay run_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting all events. @@ -153,7 +153,7 @@ function test_log4j_loglevel () # Run 5 times with a 1 second delay run_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting all events. @@ -171,7 +171,7 @@ function test_log4j_loglevel () # Run 5 times with a 1 second delay run_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting 0 events. @@ -189,7 +189,7 @@ function test_log4j_loglevel () # Run 5 times with a 1 second delay run_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting all events. @@ -209,7 +209,7 @@ function test_log4j_loglevel_multiple () # Run 5 times with a 1 second delay and fire two TP. run_app 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting all events times two. @@ -226,7 +226,7 @@ function test_log4j_loglevel_multiple () # Run 5 times with a 1 second delay and fire two TP. run_app 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting all events times two. @@ -251,8 +251,8 @@ function test_log4j_multi_session_loglevel() # Run 5 times with a 1 second delay and fire second TP. run_app 1 1 - stop_lttng_tracing $SESSION_NAME-1 - stop_lttng_tracing $SESSION_NAME-2 + 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 @@ -286,8 +286,8 @@ function test_log4j_multi_session_disable() # Run 5 times with a 1 second delay and fire second TP. run_app 0 1 - stop_lttng_tracing $SESSION_NAME-1 - stop_lttng_tracing $SESSION_NAME-2 + 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 @@ -321,8 +321,8 @@ function test_log4j_multi_session_disable_wildcard() run_app - stop_lttng_tracing $SESSION_NAME-1 - stop_lttng_tracing $SESSION_NAME-2 + 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 @@ -354,7 +354,7 @@ function test_log4j_disable_all() run_app 0 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting NO event of the first TP and second TP. @@ -380,8 +380,8 @@ function test_log4j_multi_session() # Run 5 times with a 1 second delay and fire second TP. run_app 0 1 - stop_lttng_tracing $SESSION_NAME-1 - stop_lttng_tracing $SESSION_NAME-2 + 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 @@ -411,7 +411,7 @@ function test_log4j_destroy_session() # Wait for the applications started in background wait - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting at least one event num 1 @@ -429,7 +429,7 @@ function test_log4j_destroy_session() # Wait for the applications started in background wait - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting only one event num 2 @@ -451,7 +451,7 @@ function test_log4j_filtering() # Run 5 times with a 1 second delay and fire second TP. run_app 0 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting one event of the second TP only. @@ -469,7 +469,7 @@ function test_log4j_filtering() # Run 5 times with a 1 second delay, fire debug and second TP. run_app 1 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting NR_ITER event of the main INFO tp. @@ -493,7 +493,7 @@ function test_log4j_disable() # Run 5 times with a 1 second delay and fire second TP. run_app 0 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting one event of the second TP only. @@ -517,7 +517,7 @@ function test_log4j_disable_enable() # Run 5 times with a 1 second delay and fire second TP. run_app 0 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting NR_ITER event of the main INFO tp. @@ -545,7 +545,7 @@ function test_log4j_filter_loglevel() # Run 5 times with a 1 second delay and fire second TP. run_app 0 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting no events. diff --git a/tests/regression/ust/low-throughput/test_low_throughput b/tests/regression/ust/low-throughput/test_low_throughput index e98c06725..a1948aa47 100755 --- a/tests/regression/ust/low-throughput/test_low_throughput +++ b/tests/regression/ust/low-throughput/test_low_throughput @@ -47,7 +47,7 @@ start_lttng_tracing_ok $SESSION_NAME # This is going to take 20 minutes ./$CURDIR/$BIN_NAME >/dev/null 2>&1 -stop_lttng_tracing $SESSION_NAME +stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $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 4fcb54777..45da8d204 100755 --- a/tests/regression/ust/multi-session/test_multi_session +++ b/tests/regression/ust/multi-session/test_multi_session @@ -48,7 +48,7 @@ test_multi_session() { pass "Wait for events to record" for i in `seq 0 3`; do - stop_lttng_tracing "$SESSION_NAME-$i" + stop_lttng_tracing_ok "$SESSION_NAME-$i" destroy_lttng_session "$SESSION_NAME-$i" out=$(babeltrace "$TRACE_PATH/$i" | grep "$EVENT_NAMEi$i" | wc -l) if [ $out -ne $NR_ITER ]; then diff --git a/tests/regression/ust/nprocesses/test_nprocesses b/tests/regression/ust/nprocesses/test_nprocesses index 02fd0d032..40da06839 100755 --- a/tests/regression/ust/nprocesses/test_nprocesses +++ b/tests/regression/ust/nprocesses/test_nprocesses @@ -78,7 +78,7 @@ touch ${file_sync_before_last} # We don't validate whether the applications have traced here, rather # just that they registered to sessiond (above). -stop_lttng_tracing $SESSION_NAME +stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME #TODO: add trace validation. diff --git a/tests/regression/ust/overlap/test_overlap b/tests/regression/ust/overlap/test_overlap index f85a0ccc0..7a39332af 100755 --- a/tests/regression/ust/overlap/test_overlap +++ b/tests/regression/ust/overlap/test_overlap @@ -91,7 +91,7 @@ test_enable_simple_wildcard() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_all_demo_events @@ -113,7 +113,7 @@ test_enable_wildcard_filter() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_all_demo_events return $? @@ -134,7 +134,7 @@ test_enable_wildcard_filter_2() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_all_demo_events return $? @@ -155,7 +155,7 @@ test_enable_wildcard_filter_3() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_all_demo_events return $? @@ -176,7 +176,7 @@ test_enable_wildcard_filter_4() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_no_demo_events return $? @@ -197,7 +197,7 @@ test_enable_wildcard_filter_5() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_all_demo_events return $? @@ -218,7 +218,7 @@ test_enable_wildcard_filter_6() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_matches $DEMO_EVENT1 $NUM_DEMO1_EVENT $TRACE_PATH trace_matches $DEMO_EVENT1_2 0 $TRACE_PATH @@ -242,7 +242,7 @@ test_enable_wildcard_filter_7() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_all_demo_events return $? @@ -263,7 +263,7 @@ test_enable_wildcard_filter_8() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_no_demo_events return $? @@ -284,7 +284,7 @@ test_enable_same_wildcard_filter() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_all_demo_events return $? @@ -312,7 +312,7 @@ test_enable_same_wildcard_filter_2() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_all_demo_events return $? @@ -333,7 +333,7 @@ test_enable_same_wildcard_filter_3() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_all_demo_events return $? @@ -354,7 +354,7 @@ test_enable_same_wildcard_filter_4() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_no_demo_events return $? @@ -375,7 +375,7 @@ test_enable_same_event_filter() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_matches $DEMO_EVENT1 $NUM_DEMO1_EVENT $TRACE_PATH trace_matches $DEMO_EVENT1_2 0 $TRACE_PATH @@ -401,7 +401,7 @@ test_disable_same_wildcard_filter() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_no_demo_events return $? @@ -425,7 +425,7 @@ test_enable_bad_wildcard() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_no_demo_events return $? @@ -446,7 +446,7 @@ test_enable_simple_wildcard_2() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_all_demo_events return $? @@ -467,7 +467,7 @@ test_enable_loglevel_overlap() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_all_demo_events return $? @@ -488,7 +488,7 @@ test_enable_loglevel_only_overlap() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_all_demo_events return $? @@ -509,7 +509,7 @@ test_enable_loglevel_overlap_2() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_all_demo_events return $? @@ -530,7 +530,7 @@ test_enable_same_wildcard_loglevels() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_match_all_demo_events return $? @@ -551,7 +551,7 @@ test_enable_same_event_loglevels() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME trace_matches $DEMO_EVENT1 $NUM_DEMO1_EVENT $TRACE_PATH trace_matches $DEMO_EVENT1_2 0 $TRACE_PATH @@ -578,7 +578,7 @@ test_disable_simple_wildcard() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME # No events are expected. trace_match_no_demo_events @@ -602,7 +602,7 @@ test_disable_wildcard_overlap() run_demo_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME # Expect only "ust_tests_demo" events. trace_matches "$DEMO_EVENT1" $NUM_DEMO1_EVENT $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 90f5c4dd9..25b93ec9e 100755 --- a/tests/regression/ust/periodical-metadata-flush/test_periodical_metadata_flush +++ b/tests/regression/ust/periodical-metadata-flush/test_periodical_metadata_flush @@ -161,7 +161,7 @@ test_after_app_pid() { kill -s SIGKILL ${p} wait ${p} 2>/dev/null done - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME wait_trace_apps @@ -208,7 +208,7 @@ test_before_app_pid() { wait ${p} 2>/dev/null done - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME wait_trace_apps @@ -251,7 +251,7 @@ test_after_app_uid() { kill -s SIGKILL ${p} wait ${p} 2>/dev/null done - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME wait_trace_apps @@ -296,7 +296,7 @@ test_before_app_uid() { kill -s SIGKILL ${p} wait ${p} 2>/dev/null done - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $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 91e0c00c2..5917b9fff 100755 --- a/tests/regression/ust/python-logging/test_python_logging +++ b/tests/regression/ust/python-logging/test_python_logging @@ -101,7 +101,7 @@ function test_python_before_start () # Wait for the applications started in background wait - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting all events. @@ -122,7 +122,7 @@ function test_python_after_start () # Run 5 times with a 1 second delay run_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting all events. @@ -143,7 +143,7 @@ function test_python_loglevel () # Run 5 times with a 1 second delay run_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting all events. @@ -161,7 +161,7 @@ function test_python_loglevel () # Run 5 times with a 1 second delay run_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting 0 events. @@ -179,7 +179,7 @@ function test_python_loglevel () # Run 5 times with a 1 second delay run_app - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting all events. @@ -199,7 +199,7 @@ function test_python_loglevel_multiple () # Run 5 times with a 1 second delay and fire two TP. run_app 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting all events times two. @@ -216,7 +216,7 @@ function test_python_loglevel_multiple () # Run 5 times with a 1 second delay and fire two TP. run_app 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting all events times two. @@ -241,8 +241,8 @@ function test_python_multi_session_loglevel() # Run 5 times with a 1 second delay and fire second TP. run_app 1 1 - stop_lttng_tracing $SESSION_NAME-1 - stop_lttng_tracing $SESSION_NAME-2 + 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 @@ -280,8 +280,8 @@ function test_python_multi_session_disable() # Run 5 times with a 1 second delay and fire second TP. run_app 0 1 - stop_lttng_tracing $SESSION_NAME-1 - stop_lttng_tracing $SESSION_NAME-2 + 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 @@ -315,8 +315,8 @@ function test_python_multi_session_disable_wildcard() run_app - stop_lttng_tracing $SESSION_NAME-1 - stop_lttng_tracing $SESSION_NAME-2 + 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 @@ -348,7 +348,7 @@ function test_python_disable_all() run_app 0 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting NO event of the first TP and second TP. @@ -374,8 +374,8 @@ function test_python_multi_session() # Run 5 times with a 1 second delay and fire second TP. run_app 0 1 - stop_lttng_tracing $SESSION_NAME-1 - stop_lttng_tracing $SESSION_NAME-2 + 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 @@ -406,7 +406,7 @@ function test_python_destroy_session() # Wait for the applications started in background wait - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting at least one event num 1 @@ -425,7 +425,7 @@ function test_python_destroy_session() # Wait for the applications started in background wait - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting only one event num 2 @@ -447,7 +447,7 @@ function test_python_filtering() # Run 5 times with a 1 second delay and fire second TP. run_app 0 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting one event of the second TP only. @@ -465,7 +465,7 @@ function test_python_filtering() # Run 5 times with a 1 second delay, fire debug and second TP. run_app 1 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting NR_ITER event of the main INFO tp. @@ -489,7 +489,7 @@ function test_python_disable() # Run 5 times with a 1 second delay and fire second TP. run_app 0 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting one event of the second TP only. @@ -513,7 +513,7 @@ function test_python_disable_enable() # Run 5 times with a 1 second delay and fire second TP. run_app 0 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting NR_ITER event of the main INFO tp. @@ -541,7 +541,7 @@ function test_python_filter_loglevel() # Run 5 times with a 1 second delay and fire second TP. run_app 0 1 - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $SESSION_NAME # Validate test. Expecting no events. diff --git a/tests/regression/ust/test_event_basic b/tests/regression/ust/test_event_basic index 59089fd5a..df86d2914 100755 --- a/tests/regression/ust/test_event_basic +++ b/tests/regression/ust/test_event_basic @@ -91,10 +91,10 @@ function test_event_basic() enable_ust_lttng_event_per_chan $SESSION_NAME2 $EVENT_NAME3 $CHAN_NAME2 start_lttng_tracing_ok - stop_lttng_tracing + stop_lttng_tracing_ok start_lttng_tracing_ok - stop_lttng_tracing + stop_lttng_tracing_ok TODO="Validate trace output is coherent" ok 0 "Validate trace" diff --git a/tests/regression/ust/test_event_perf b/tests/regression/ust/test_event_perf index 84e56d31d..8bdff2c7b 100755 --- a/tests/regression/ust/test_event_perf +++ b/tests/regression/ust/test_event_perf @@ -70,7 +70,7 @@ function test_event_basic() $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT >/dev/null 2>&1 - stop_lttng_tracing + stop_lttng_tracing_ok destroy_lttng_session $SESSION_NAME diff --git a/tests/regression/ust/test_event_tracef b/tests/regression/ust/test_event_tracef index 1577445e4..a3344227f 100755 --- a/tests/regression/ust/test_event_tracef +++ b/tests/regression/ust/test_event_tracef @@ -44,7 +44,7 @@ function test_event_tracef() $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT ok $? "Traced application stopped." - stop_lttng_tracing $SESSION_NAME + stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session $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 f50e5df87..2cb562f0f 100755 --- a/tests/regression/ust/test_event_wildcard +++ b/tests/regression/ust/test_event_wildcard @@ -43,7 +43,7 @@ function test_event_wildcard() enable_ust_lttng_event_ok $SESSION_NAME "$EVENT_NAME2" start_lttng_tracing_ok - stop_lttng_tracing + stop_lttng_tracing_ok TODO="Validate trace output is coherent" ok 0 "Validate trace" diff --git a/tests/stress/test_multi_sessions_per_uid_10app b/tests/stress/test_multi_sessions_per_uid_10app index 5d41fa517..97ccab2d5 100755 --- a/tests/stress/test_multi_sessions_per_uid_10app +++ b/tests/stress/test_multi_sessions_per_uid_10app @@ -89,7 +89,7 @@ test_stress() done for a in $(seq 1 $NR_SESSION); do - stop_lttng_tracing $SESSION_NAME-$a + stop_lttng_tracing_ok $SESSION_NAME-$a check_sessiond destroy_lttng_session $SESSION_NAME-$a check_sessiond diff --git a/tests/stress/test_multi_sessions_per_uid_5app_streaming b/tests/stress/test_multi_sessions_per_uid_5app_streaming index 817621ab2..1eafbd84c 100755 --- a/tests/stress/test_multi_sessions_per_uid_5app_streaming +++ b/tests/stress/test_multi_sessions_per_uid_5app_streaming @@ -126,7 +126,7 @@ test_stress() done for a in $(seq 1 $NR_SESSION); do - stop_lttng_tracing $SESSION_NAME-$a + stop_lttng_tracing_ok $SESSION_NAME-$a check_sessiond check_relayd destroy_lttng_session $SESSION_NAME-$a 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 1b1cf56bd..60d7071f8 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 @@ -128,7 +128,7 @@ test_stress() done for a in $(seq 1 $NR_SESSION); do - stop_lttng_tracing $SESSION_NAME-$a + stop_lttng_tracing_ok $SESSION_NAME-$a check_sessiond check_relayd destroy_lttng_session $SESSION_NAME-$a diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index f9df77bb0..067a4f532 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -686,12 +686,12 @@ function start_lttng_tracing_fail () function stop_lttng_tracing () { - local sess_name=$1 - local expected_to_fail=$2 + local expected_to_fail=$1 + local sess_name=$2 $TESTDIR/../src/bin/lttng/$LTTNG_BIN stop $sess_name >$OUTPUT_DEST ret=$? - if [[ $expected_to_fail ]]; then + if [[ $expected_to_fail -eq "1" ]]; then test "$ret" -ne "0" ok $? "Expected fail on stop tracing for session: $sess_name" else @@ -699,6 +699,16 @@ function stop_lttng_tracing () fi } +function stop_lttng_tracing_ok () +{ + stop_lttng_tracing 0 "$@" +} + +function stop_lttng_tracing_fail () +{ + stop_lttng_tracing 1 "$@" +} + function destroy_lttng_session () { local sess_name=$1 @@ -706,7 +716,7 @@ function destroy_lttng_session () $TESTDIR/../src/bin/lttng/$LTTNG_BIN destroy $sess_name >$OUTPUT_DEST ret=$? - if [[ $expected_to_fail ]]; then + if [[ $expected_to_fail -eq "1" ]]; then test "$ret" -ne "0" ok $? "Expected fail on session deletion $sess_name" else