From: Jonathan Rajotte Date: Thu, 23 Apr 2015 20:32:19 +0000 (-0400) Subject: Refactor: test: wrapper for create_lttng_session X-Git-Tag: v2.7.0-rc1~24 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=bf6ae429bc7bf2fefdce61e48806768dab7567d5;p=lttng-tools.git Refactor: test: wrapper for create_lttng_session 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 afd42ab39..63be15470 100755 --- a/tests/regression/kernel/test_all_events +++ b/tests/regression/kernel/test_all_events @@ -28,7 +28,7 @@ function test_all_event() TRACE_PATH=$(mktemp -d) SESSION_NAME="kernel_all_events_basic" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH lttng_enable_kernel_event $SESSION_NAME diff --git a/tests/regression/kernel/test_event_basic b/tests/regression/kernel/test_event_basic index a182f9f21..2906ec71e 100755 --- a/tests/regression/kernel/test_event_basic +++ b/tests/regression/kernel/test_event_basic @@ -28,7 +28,7 @@ function test_event_basic() TRACE_PATH=$(mktemp -d) SESSION_NAME="kernel_event_basic" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH lttng_enable_kernel_event $SESSION_NAME "sched_switch" lttng_enable_kernel_event $SESSION_NAME "sched_process_exit" @@ -51,7 +51,7 @@ function test_enable_after_start() TRACE_PATH=$(mktemp -d) SESSION_NAME="kernel_enable_after_start" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH lttng_enable_kernel_event $SESSION_NAME "sched_switch" diff --git a/tests/regression/kernel/test_syscall b/tests/regression/kernel/test_syscall index a7800d2a1..9fe599a15 100755 --- a/tests/regression/kernel/test_syscall +++ b/tests/regression/kernel/test_syscall @@ -59,7 +59,7 @@ function test_syscall_simple_list() diag "Syscall simple listing" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH lttng_enable_kernel_syscall_ok $SESSION_NAME $EVENT_NAME @@ -90,7 +90,7 @@ function test_syscall_simple_list_two() diag "Syscall simple listing" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH lttng_enable_kernel_syscall_ok $SESSION_NAME $EVENT_NAME lttng_enable_kernel_syscall_ok $SESSION_NAME $EVENT_NAME2 @@ -125,7 +125,7 @@ function test_syscall_single() diag "Syscall trace single" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH lttng_enable_kernel_syscall_ok $SESSION_NAME "open" @@ -152,7 +152,7 @@ function test_syscall_two() diag "Syscall trace two events" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH lttng_enable_kernel_syscall_ok $SESSION_NAME "open" lttng_enable_kernel_syscall_ok $SESSION_NAME "close" @@ -182,7 +182,7 @@ function test_syscall_all() diag "Syscall trace all events" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH # enable all syscalls lttng_enable_kernel_syscall_ok $SESSION_NAME @@ -210,7 +210,7 @@ function test_syscall_all_disable_one() diag "Syscall trace all events and disable one" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH # enable all syscalls lttng_enable_kernel_syscall_ok $SESSION_NAME @@ -241,7 +241,7 @@ function test_syscall_all_disable_two() diag "Syscall trace all events and disable two" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH # enable all syscalls lttng_enable_kernel_syscall_ok $SESSION_NAME @@ -278,7 +278,7 @@ function test_syscall_enable_all_disable_all() diag "Syscall trace all events and disable all" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH # enable all system calls lttng_enable_kernel_syscall_ok $SESSION_NAME @@ -305,7 +305,7 @@ function test_syscall_enable_all_disable_all_enable_all() diag "Syscall trace all events and enable/disable all" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH # enable all system calls lttng_enable_kernel_syscall_ok $SESSION_NAME @@ -338,7 +338,7 @@ function test_syscall_enable_all_disable_all_twice() diag "Syscall trace all events and enable/disable all twice" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH # enable all system calls lttng_enable_kernel_syscall_ok $SESSION_NAME @@ -369,7 +369,7 @@ function test_syscall_enable_one_disable_one() diag "Syscall trace one event and disable one" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH # enable open system call lttng_enable_kernel_syscall_ok $SESSION_NAME "open" @@ -396,7 +396,7 @@ function test_syscall_enable_two_disable_two() diag "Syscall trace two events and disable two" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH # enable open and close system calls lttng_enable_kernel_syscall_ok $SESSION_NAME "open" @@ -425,7 +425,7 @@ function test_syscall_enable_two_disable_one() diag "Syscall trace two events and disable one" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH # enable open and close system calls lttng_enable_kernel_syscall_ok $SESSION_NAME "open" @@ -457,7 +457,7 @@ function test_syscall_disable_twice() diag "Syscall trace one event and disable twice" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH lttng_enable_kernel_syscall_ok $SESSION_NAME "open" # First disable will succeed @@ -477,7 +477,7 @@ function test_syscall_disable_all_twice() diag "Syscall trace all events and disable all twice" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH lttng_enable_kernel_syscall_ok $SESSION_NAME # First disable will succeed @@ -498,7 +498,7 @@ function test_syscall_enable_unknown() diag "Syscall enable an unknown event" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH # Enabling a syscall that does not exist succeeds, due to enabler # semantic. @@ -516,7 +516,7 @@ function test_syscall_enable_all_enable_one() diag "Syscall enable all and enable one" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH lttng_enable_kernel_syscall_ok $SESSION_NAME # Enabling an event already enabled succeeds, due to enabler semantic. @@ -534,7 +534,7 @@ function test_syscall_disable_all_disable_one() diag "Syscall disable all and disable one" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH lttng_enable_kernel_syscall_ok $SESSION_NAME lttng_disable_kernel_syscall_ok $SESSION_NAME @@ -554,7 +554,7 @@ function test_syscall_enable_channel_disable_all() diag "Syscall enable channel and disable all" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH lttng_enable_kernel_channel_ok $SESSION_NAME $CHANNEL_NAME # sessiond semantic for "disable all" is to try to match all enalers @@ -574,7 +574,7 @@ function test_syscall_enable_channel_disable_one() diag "Syscall enable channel and disable one" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH lttng_enable_kernel_channel_ok $SESSION_NAME $CHANNEL_NAME lttng_disable_kernel_syscall_fail $SESSION_NAME "open" $CHANNEL_NAME diff --git a/tests/regression/tools/exclusion/test_exclusion b/tests/regression/tools/exclusion/test_exclusion index c1d76700a..94f5251ba 100755 --- a/tests/regression/tools/exclusion/test_exclusion +++ b/tests/regression/tools/exclusion/test_exclusion @@ -52,7 +52,7 @@ function test_exclusion trace_path=$(mktemp -d) # Create session - create_lttng_session $SESSION_NAME $trace_path + create_lttng_session_ok $SESSION_NAME $trace_path enable_ust_lttng_all_event_exclusion $SESSION_NAME $EV_EXCLUDE_NAME diff --git a/tests/regression/tools/filtering/test_invalid_filter b/tests/regression/tools/filtering/test_invalid_filter index e566c8b72..c639ff172 100755 --- a/tests/regression/tools/filtering/test_invalid_filter +++ b/tests/regression/tools/filtering/test_invalid_filter @@ -54,7 +54,7 @@ function test_invalid_filter diag "Filter: $test_invalid_filter" # Create session - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH # Apply filter enable_ust_lttng_event_filter $SESSION_NAME $EVENT_NAME "$test_invalid_filter" @@ -72,7 +72,7 @@ function test_bytecode_limit diag "Test filter bytecode limits (64KiB)" # Create session - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH # Apply filter enable_ust_lttng_event_filter $SESSION_NAME $EVENT_NAME "$BYTECODE_LIMIT" diff --git a/tests/regression/tools/filtering/test_unsupported_op b/tests/regression/tools/filtering/test_unsupported_op index b5b7f27bb..d60814922 100755 --- a/tests/regression/tools/filtering/test_unsupported_op +++ b/tests/regression/tools/filtering/test_unsupported_op @@ -54,7 +54,7 @@ function test_unsupported_op diag "Test filter expression with unsupported operator $test_op_str ($test_op_tkn)" # Create session - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH # Create filter if [ "$test_op_str" == "UNARY_BIN_NOT" ]; then diff --git a/tests/regression/tools/filtering/test_valid_filter b/tests/regression/tools/filtering/test_valid_filter index 4d8d2afff..b2254b3e6 100755 --- a/tests/regression/tools/filtering/test_valid_filter +++ b/tests/regression/tools/filtering/test_valid_filter @@ -59,7 +59,7 @@ function test_valid_filter trace_path=$(mktemp -d) # Create session - create_lttng_session $SESSION_NAME $trace_path + create_lttng_session_ok $SESSION_NAME $trace_path # Enable filter enable_ust_lttng_event_filter $SESSION_NAME $EVENT_NAME $filter diff --git a/tests/regression/tools/mi/test_mi b/tests/regression/tools/mi/test_mi index c44b598e5..620b53cf7 100755 --- a/tests/regression/tools/mi/test_mi +++ b/tests/regression/tools/mi/test_mi @@ -140,12 +140,12 @@ function test_create_session () OUTPUT_FILE="create_session.xml" OUTPUT_DEST=$OUTPUT_DIR/$OUTPUT_FILE - create_lttng_session $session_name $OUTPUT_DIR + create_lttng_session_ok $session_name $OUTPUT_DIR $XML_VALIDATE $OUTPUT_DEST ok $? "MI test: create session xsd validation" #try to recreate a session. Expecting it to fail - create_lttng_session $session_name $OUTPUT_DIR true + create_lttng_session_fail $session_name $OUTPUT_DIR $XML_VALIDATE $OUTPUT_DEST ok $? "MI test: expecting fail create session xsd validation" is_command_success $OUTPUT_DEST true @@ -166,7 +166,7 @@ function test_destroy_session () #Test build up OUTPUT_DEST=$DEVNULL for (( i = 0; i < 3; i++ )); do - create_lttng_session ${session_name[$i]} $OUTPUT_DIR + create_lttng_session_ok ${session_name[$i]} $OUTPUT_DIR done OUTPUT_DEST=$OUTPUT_DIR/$OUTPUT_FILE @@ -212,7 +212,7 @@ function test_list_sessions () #Test buid up OUTPUT_DEST=$DEVNULL for (( i = 0; i < 3; i++ )); do - create_lttng_session ${session_name[$i]} $OUTPUT_DIR + create_lttng_session_ok ${session_name[$i]} $OUTPUT_DIR done OUTPUT_DEST=$OUTPUT_DIR/$OUTPUT_FILE @@ -242,7 +242,7 @@ function test_ust_channel () #Test buil up OUTPUT_DEST=$DEVNULL - create_lttng_session $session_name $OUTPUT_DIR + create_lttng_session_ok $session_name $OUTPUT_DIR #Test the enable_channel command OUTPUT_DEST=$OUTPUT_DIR/$OUTPUT_FILE @@ -300,7 +300,7 @@ function test_ust_lttng_event () #Test build up OUTPUT_DEST=$DEVNULL - create_lttng_session $session_name $OUTPUT_DIR + create_lttng_session_ok $session_name $OUTPUT_DIR enable_ust_lttng_channel $session_name $channel_name OUTPUT_DEST=$OUTPUT_DIR/$OUTPUT_FILE @@ -372,7 +372,7 @@ function test_list_channel () #Test buid up OUTPUT_DEST=$DEVNULL - create_lttng_session $session_name $OUTPUT_DIR + create_lttng_session_ok $session_name $OUTPUT_DIR enable_ust_lttng_channel $session_name $channel_name #Enable ust and jul events @@ -419,7 +419,7 @@ function test_list_domain () #Test buid up OUTPUT_DEST=$DEVNULL - create_lttng_session $session_name $OUTPUT_DIR + create_lttng_session_ok $session_name $OUTPUT_DIR enable_ust_lttng_channel $session_name $channel_name #Enable ust and jul events @@ -467,7 +467,7 @@ function test_list_session () #Test buid up OUTPUT_DEST=$DEVNULL - create_lttng_session $session_name $OUTPUT_DIR + create_lttng_session_ok $session_name $OUTPUT_DIR enable_ust_lttng_channel $session_name $channel_name #Enable ust and jul events @@ -540,7 +540,7 @@ function test_start_stop () { #Test buid up OUTPUT_DEST=$DEVNULL - create_lttng_session $session_name $OUTPUT_DIR + create_lttng_session_ok $session_name $OUTPUT_DIR #Test fail command #No channel enable start command should return element success false diff --git a/tests/regression/tools/save-load/test_save b/tests/regression/tools/save-load/test_save index 9132b5a05..abb2c5684 100755 --- a/tests/regression/tools/save-load/test_save +++ b/tests/regression/tools/save-load/test_save @@ -65,7 +65,7 @@ function test_basic_save() { diag "Test basic save" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_ust_lttng_channel $SESSION_NAME $CHANNEL_NAME enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME @@ -80,9 +80,9 @@ function test_basic_save_all() { diag "Test basic save all" - create_lttng_session $SESSION_NAME-1 $TRACE_PATH - create_lttng_session $SESSION_NAME-2 $TRACE_PATH - create_lttng_session $SESSION_NAME-3 $TRACE_PATH + create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH + create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH + create_lttng_session_ok $SESSION_NAME-3 $TRACE_PATH enable_ust_lttng_channel $SESSION_NAME-1 $CHANNEL_NAME enable_ust_lttng_channel $SESSION_NAME-2 $CHANNEL_NAME @@ -107,7 +107,7 @@ function test_overwrite() { diag "Test overwrite session file" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_ust_lttng_channel $SESSION_NAME $CHANNEL_NAME enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME @@ -118,7 +118,7 @@ function test_overwrite() destroy_lttng_session $SESSION_NAME # Create a new session with same name so we can force the overwrite - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_ust_lttng_channel $SESSION_NAME $CHANNEL_NAME enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME diff --git a/tests/regression/tools/tracefile-limits/test_tracefile_count b/tests/regression/tools/tracefile-limits/test_tracefile_count index df1cdceaf..8dfcbad73 100755 --- a/tests/regression/tools/tracefile-limits/test_tracefile_count +++ b/tests/regression/tools/tracefile-limits/test_tracefile_count @@ -108,7 +108,7 @@ function test_tracefile_count_limit () diag "Test tracefile count limit : $count_limit tracefiles" - create_lttng_session $session_name $trace_path + create_lttng_session_ok $session_name $trace_path enable_lttng_channel_count_limit \ $session_name $channel_name $count_limit diff --git a/tests/regression/tools/tracefile-limits/test_tracefile_size b/tests/regression/tools/tracefile-limits/test_tracefile_size index 92144ebb7..1583c9519 100755 --- a/tests/regression/tools/tracefile-limits/test_tracefile_size +++ b/tests/regression/tools/tracefile-limits/test_tracefile_size @@ -100,7 +100,7 @@ function test_tracefile_size_limit () diag "Test tracefile size limit : $size_limit bytes" - create_lttng_session $session_name $trace_path + create_lttng_session_ok $session_name $trace_path enable_lttng_channel_size_limit \ $session_name $channel_name $size_limit diff --git a/tests/regression/ust/before-after/test_before_after b/tests/regression/ust/before-after/test_before_after index 460b04c4e..0b2812415 100755 --- a/tests/regression/ust/before-after/test_before_after +++ b/tests/regression/ust/before-after/test_before_after @@ -38,7 +38,7 @@ fi function test_before_apps() { # BEFORE application is spawned - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_ust_lttng_event $SESSION_NAME $EVENT_NAME start_lttng_tracing $SESSION_NAME @@ -60,7 +60,7 @@ function test_after_apps() local file_sync_after_first=$(mktemp -u) local file_sync_before_last=$(mktemp -u) - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT ${file_sync_after_first} ${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 c95a4a1f9..b397fc113 100755 --- a/tests/regression/ust/buffers-pid/test_buffers_pid +++ b/tests/regression/ust/buffers-pid/test_buffers_pid @@ -52,7 +52,7 @@ test_after_multiple_apps() { diag "Start multiple applications AFTER tracing is started" # BEFORE application is spawned - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_channel_per_pid $SESSION_NAME "channel0" enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0" start_lttng_tracing $SESSION_NAME @@ -85,7 +85,7 @@ test_before_multiple_apps() { done # BEFORE application is spawned - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_channel_per_pid $SESSION_NAME "channel0" enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0" start_lttng_tracing $SESSION_NAME @@ -126,7 +126,7 @@ test_after_app() { diag "Start application AFTER tracing is started" # BEFORE application is spawned - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_channel_per_pid $SESSION_NAME "channel0" enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0" start_lttng_tracing $SESSION_NAME @@ -152,7 +152,7 @@ test_before_app() { # BEFORE application is spawned - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_channel_per_pid $SESSION_NAME "channel0" enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0" @@ -191,7 +191,7 @@ test_multiple_channels() { diag "Start with multiple channels" # BEFORE application is spawned - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_channel_per_pid $SESSION_NAME "channel0" enable_channel_per_pid $SESSION_NAME "channel1" enable_channel_per_pid $SESSION_NAME "channel2" diff --git a/tests/regression/ust/high-throughput/test_high_throughput b/tests/regression/ust/high-throughput/test_high_throughput index 1ee0ec10f..dcd2f71a7 100755 --- a/tests/regression/ust/high-throughput/test_high_throughput +++ b/tests/regression/ust/high-throughput/test_high_throughput @@ -40,7 +40,7 @@ print_test_banner "$TEST_DESC" start_lttng_sessiond -create_lttng_session $SESSION_NAME $TRACE_PATH +create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_ust_lttng_event $SESSION_NAME $EVENT_NAME start_lttng_tracing $SESSION_NAME diff --git a/tests/regression/ust/java-jul/test_java_jul b/tests/regression/ust/java-jul/test_java_jul index d32d9ed45..4835e3dcd 100755 --- a/tests/regression/ust/java-jul/test_java_jul +++ b/tests/regression/ust/java-jul/test_java_jul @@ -94,7 +94,7 @@ function test_jul_before_start () local file_sync_before_last=$(mktemp -u) diag "Test JUL application BEFORE tracing starts" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_jul_lttng_event $SESSION_NAME $EVENT_NAME # Run 5 times with a 1 second delay @@ -124,7 +124,7 @@ function test_jul_after_start () { diag "Test JUL application AFTER tracing starts" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_jul_lttng_event $SESSION_NAME $EVENT_NAME start_lttng_tracing $SESSION_NAME @@ -145,7 +145,7 @@ function test_jul_loglevel () { diag "Test JUL application with loglevel" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_jul_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "JUL_INFO" start_lttng_tracing $SESSION_NAME @@ -163,7 +163,7 @@ function test_jul_loglevel () diag "Test JUL applications with lower loglevel" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_jul_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "JUL_SEVERE" start_lttng_tracing $SESSION_NAME @@ -181,7 +181,7 @@ function test_jul_loglevel () diag "Test JUL applications with higher loglevel" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_jul_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "JUL_FINER" start_lttng_tracing $SESSION_NAME @@ -200,7 +200,7 @@ function test_jul_loglevel_multiple () { diag "Test JUL application with multiple loglevel" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_jul_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "JUL_INFO" enable_jul_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "JUL_FINEST" start_lttng_tracing $SESSION_NAME @@ -217,7 +217,7 @@ function test_jul_loglevel_multiple () return $? fi - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_jul_lttng_event_loglevel $SESSION_NAME '*' "JUL_INFO" enable_jul_lttng_event_loglevel $SESSION_NAME '*' "JUL_FINEST" start_lttng_tracing $SESSION_NAME @@ -239,11 +239,11 @@ function test_jul_multi_session_loglevel() { diag "Test JUL with multiple session" - create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 + create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 enable_jul_loglevel_only $SESSION_NAME-1 '*' "JUL_INFO" start_lttng_tracing $SESSION_NAME-1 - create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 + create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 enable_jul_loglevel_only $SESSION_NAME-2 '*' "JUL_FINEST" start_lttng_tracing $SESSION_NAME-2 @@ -272,13 +272,13 @@ function test_jul_multi_session_disable() { diag "Test JUL with multiple session with disabled event" - create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 + create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 enable_jul_lttng_event $SESSION_NAME-1 $EVENT_NAME enable_jul_lttng_event $SESSION_NAME-1 $EVENT_NAME2 disable_jul_lttng_event $SESSION_NAME-1 $EVENT_NAME start_lttng_tracing $SESSION_NAME-1 - create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 + create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 enable_jul_lttng_event $SESSION_NAME-2 $EVENT_NAME2 start_lttng_tracing $SESSION_NAME-2 @@ -307,10 +307,10 @@ function test_jul_multi_session_disable_wildcard() { diag "Test JUL with multiple session with disabled wildcard event" - create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 + create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 enable_jul_lttng_event $SESSION_NAME-1 '*' - create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 + create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 enable_jul_lttng_event $SESSION_NAME-2 '*' disable_jul_lttng_event $SESSION_NAME-1 '*' @@ -342,7 +342,7 @@ function test_jul_disable_all() { diag "Test JUL with multiple session with disabled all event" - create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME enable_jul_lttng_event $SESSION_NAME '*' enable_jul_lttng_event $SESSION_NAME $EVENT_NAME enable_jul_lttng_event $SESSION_NAME $EVENT_NAME2 @@ -368,11 +368,11 @@ function test_jul_multi_session() { diag "Test JUL with multiple session" - create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 + create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 enable_jul_lttng_event $SESSION_NAME-1 $EVENT_NAME start_lttng_tracing $SESSION_NAME-1 - create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 + create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 enable_jul_lttng_event $SESSION_NAME-2 $EVENT_NAME2 start_lttng_tracing $SESSION_NAME-2 @@ -401,7 +401,7 @@ function test_jul_destroy_session() { diag "Test JUL two session with destroy" - create_lttng_session $SESSION_NAME $TRACE_PATH/first-sess + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/first-sess enable_jul_lttng_event $SESSION_NAME $EVENT_NAME start_lttng_tracing $SESSION_NAME @@ -420,7 +420,7 @@ function test_jul_destroy_session() return $? fi - create_lttng_session $SESSION_NAME $TRACE_PATH/second-sess + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/second-sess enable_jul_lttng_event $SESSION_NAME $EVENT_NAME2 start_lttng_tracing $SESSION_NAME @@ -444,7 +444,7 @@ function test_jul_filtering() { diag "Test JUL filtering" - create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME # Enable all event with a filter. enable_jul_filter $SESSION_NAME '*' 'msg == "JUL second logger fired"' start_lttng_tracing $SESSION_NAME @@ -461,7 +461,7 @@ function test_jul_filtering() return $? fi - create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME # Enable first Logger but filter msg payload for the INFO one while # triggering the finest and second TP. enable_jul_filter $SESSION_NAME $EVENT_NAME 'msg == "JUL tp fired!"' @@ -484,7 +484,7 @@ function test_jul_disable() { diag "Test JUL disable event" - create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME # Enable all event with a filter. enable_jul_lttng_event $SESSION_NAME $EVENT_NAME enable_jul_lttng_event $SESSION_NAME $EVENT_NAME2 @@ -508,7 +508,7 @@ function test_jul_disable_enable() { diag "Test JUL disable event followed by an enable" - create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME # Enable all event with a filter. enable_jul_lttng_event $SESSION_NAME $EVENT_NAME disable_jul_lttng_event $SESSION_NAME $EVENT_NAME @@ -536,7 +536,7 @@ function test_jul_filter_loglevel() diag "Test JUL a filter with a loglevel" - create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME # Enable an event with a filter and the loglevel-only option. enable_jul_filter_loglevel_only $SESSION_NAME $BOGUS_EVENT_NAME "$FILTER" JUL_CONFIG disable_jul_lttng_event $SESSION_NAME $BOGUS_EVENT_NAME diff --git a/tests/regression/ust/java-log4j/test_java_log4j b/tests/regression/ust/java-log4j/test_java_log4j index a0b7cdc0f..77df00a79 100755 --- a/tests/regression/ust/java-log4j/test_java_log4j +++ b/tests/regression/ust/java-log4j/test_java_log4j @@ -95,7 +95,7 @@ function test_log4j_before_start () local file_sync_before_last=$(mktemp -u) diag "Test LOG4J application BEFORE tracing starts" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME # Run 5 times with a 1 second delay @@ -125,7 +125,7 @@ function test_log4j_after_start () { diag "Test LOG4J application AFTER tracing starts" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME start_lttng_tracing $SESSION_NAME @@ -146,7 +146,7 @@ function test_log4j_loglevel () { diag "Test LOG4J application with loglevel" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_log4j_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "LOG4J_INFO" start_lttng_tracing $SESSION_NAME @@ -164,7 +164,7 @@ function test_log4j_loglevel () diag "Test LOG4J applications with lower loglevel" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_log4j_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "LOG4J_FATAL" start_lttng_tracing $SESSION_NAME @@ -182,7 +182,7 @@ function test_log4j_loglevel () diag "Test LOG4J applications with higher loglevel" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_log4j_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "LOG4J_TRACE" start_lttng_tracing $SESSION_NAME @@ -201,7 +201,7 @@ function test_log4j_loglevel_multiple () { diag "Test LOG4J application with multiple loglevel" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_log4j_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "LOG4J_INFO" enable_log4j_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "LOG4J_DEBUG" start_lttng_tracing $SESSION_NAME @@ -218,7 +218,7 @@ function test_log4j_loglevel_multiple () return $? fi - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_log4j_lttng_event_loglevel $SESSION_NAME '*' "LOG4J_INFO" enable_log4j_lttng_event_loglevel $SESSION_NAME '*' "LOG4J_DEBUG" start_lttng_tracing $SESSION_NAME @@ -240,11 +240,11 @@ function test_log4j_multi_session_loglevel() { diag "Test LOG4J with multiple session" - create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 + create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 enable_log4j_loglevel_only $SESSION_NAME-1 '*' "LOG4J_INFO" start_lttng_tracing $SESSION_NAME-1 - create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 + create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 enable_log4j_loglevel_only $SESSION_NAME-2 '*' "LOG4J_DEBUG" start_lttng_tracing $SESSION_NAME-2 @@ -273,13 +273,13 @@ function test_log4j_multi_session_disable() { diag "Test LOG4J with multiple session with disabled event" - create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 + create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 enable_log4j_lttng_event $SESSION_NAME-1 $EVENT_NAME enable_log4j_lttng_event $SESSION_NAME-1 $EVENT_NAME2 disable_log4j_lttng_event $SESSION_NAME-1 $EVENT_NAME start_lttng_tracing $SESSION_NAME-1 - create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 + create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 enable_log4j_lttng_event $SESSION_NAME-2 $EVENT_NAME2 start_lttng_tracing $SESSION_NAME-2 @@ -308,10 +308,10 @@ function test_log4j_multi_session_disable_wildcard() { diag "Test LOG4J with multiple session with disabled wildcard event" - create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 + create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 enable_log4j_lttng_event $SESSION_NAME-1 '*' - create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 + create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 enable_log4j_lttng_event $SESSION_NAME-2 '*' disable_log4j_lttng_event $SESSION_NAME-1 '*' @@ -343,7 +343,7 @@ function test_log4j_disable_all() { diag "Test LOG4J with multiple session with disabled all event" - create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME enable_log4j_lttng_event $SESSION_NAME '*' enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME2 @@ -369,11 +369,11 @@ function test_log4j_multi_session() { diag "Test LOG4J with multiple session" - create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 + create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 enable_log4j_lttng_event $SESSION_NAME-1 $EVENT_NAME start_lttng_tracing $SESSION_NAME-1 - create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 + create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 enable_log4j_lttng_event $SESSION_NAME-2 $EVENT_NAME2 start_lttng_tracing $SESSION_NAME-2 @@ -402,7 +402,7 @@ function test_log4j_destroy_session() { diag "Test LOG4J two session with destroy" - create_lttng_session $SESSION_NAME $TRACE_PATH/first-sess + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/first-sess enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME start_lttng_tracing $SESSION_NAME @@ -420,7 +420,7 @@ function test_log4j_destroy_session() return $? fi - create_lttng_session $SESSION_NAME $TRACE_PATH/second-sess + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/second-sess enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME2 start_lttng_tracing $SESSION_NAME @@ -443,7 +443,7 @@ function test_log4j_filtering() { diag "Test LOG4J filtering" - create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME # Enable all event with a filter. enable_log4j_filter $SESSION_NAME '*' 'msg == "LOG4J second logger fired"' start_lttng_tracing $SESSION_NAME @@ -460,7 +460,7 @@ function test_log4j_filtering() return $? fi - create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME # Enable first Logger but filter msg payload for the INFO one while # triggering the debug and second TP. enable_log4j_filter $SESSION_NAME $EVENT_NAME 'msg == "LOG4J tp fired!"' @@ -483,7 +483,7 @@ function test_log4j_disable() { diag "Test LOG4J disable event" - create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME # Enable all event with a filter. enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME2 @@ -507,7 +507,7 @@ function test_log4j_disable_enable() { diag "Test LOG4J disable event followed by an enable" - create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME # Enable all event with a filter. enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME disable_log4j_lttng_event $SESSION_NAME $EVENT_NAME @@ -535,7 +535,7 @@ function test_log4j_filter_loglevel() diag "Test LOG4J a filter with a loglevel" - create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME # Enable an event with a filter and the loglevel-only option. enable_log4j_filter_loglevel_only $SESSION_NAME $BOGUS_EVENT_NAME "$FILTER" LOG4J_INFO disable_log4j_lttng_event $SESSION_NAME $BOGUS_EVENT_NAME diff --git a/tests/regression/ust/low-throughput/test_low_throughput b/tests/regression/ust/low-throughput/test_low_throughput index 1ca3c38d0..92d739dd4 100755 --- a/tests/regression/ust/low-throughput/test_low_throughput +++ b/tests/regression/ust/low-throughput/test_low_throughput @@ -39,7 +39,7 @@ print_test_banner "$TEST_DESC" start_lttng_sessiond -create_lttng_session $SESSION_NAME $TRACE_PATH +create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_ust_lttng_event $SESSION_NAME $EVENT_NAME start_lttng_tracing $SESSION_NAME diff --git a/tests/regression/ust/multi-session/test_multi_session b/tests/regression/ust/multi-session/test_multi_session index e1ff9b091..63ed54def 100755 --- a/tests/regression/ust/multi-session/test_multi_session +++ b/tests/regression/ust/multi-session/test_multi_session @@ -36,7 +36,7 @@ test_multi_session() { # BEFORE application is spawned for i in `seq 0 3`; do - create_lttng_session "$SESSION_NAME-$i" "$TRACE_PATH/$i" + create_lttng_session_ok "$SESSION_NAME-$i" "$TRACE_PATH/$i" enable_ust_lttng_event "$SESSION_NAME-$i" "$EVENT_NAME$i" start_lttng_tracing "$SESSION_NAME-$i" done diff --git a/tests/regression/ust/nprocesses/test_nprocesses b/tests/regression/ust/nprocesses/test_nprocesses index 8eed95fca..a9b9db276 100755 --- a/tests/regression/ust/nprocesses/test_nprocesses +++ b/tests/regression/ust/nprocesses/test_nprocesses @@ -68,7 +68,7 @@ pass "All applications are registered to sessiond" TRACE_PATH=$(mktemp -d) -create_lttng_session $SESSION_NAME $TRACE_PATH +create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_ust_lttng_event $SESSION_NAME $EVENT_NAME start_lttng_tracing $SESSION_NAME diff --git a/tests/regression/ust/overlap/test_overlap b/tests/regression/ust/overlap/test_overlap index 3a8af98a7..8300fbf7c 100755 --- a/tests/regression/ust/overlap/test_overlap +++ b/tests/regression/ust/overlap/test_overlap @@ -651,7 +651,7 @@ while [ "$i" -lt "$TEST_COUNT" ]; do TRACE_PATH=$(mktemp -d) - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH # Execute test ${TESTS[$i]} 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 7937fa27d..cbfe1a9e6 100755 --- a/tests/regression/ust/periodical-metadata-flush/test_periodical_metadata_flush +++ b/tests/regression/ust/periodical-metadata-flush/test_periodical_metadata_flush @@ -134,7 +134,7 @@ test_after_app_pid() { diag "Start application AFTER tracing is started" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_metadata_per_pid $SESSION_NAME enable_channel_per_pid $SESSION_NAME "channel0" enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0" @@ -180,7 +180,7 @@ test_before_app_pid() { start_trace_app # Start application before tracing - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_metadata_per_pid $SESSION_NAME enable_channel_per_pid $SESSION_NAME "channel0" enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0" @@ -223,7 +223,7 @@ test_after_app_uid() { diag "Start application AFTER tracing is started" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_metadata_per_uid $SESSION_NAME enable_channel_per_uid $SESSION_NAME "channel0" enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0" @@ -269,7 +269,7 @@ test_before_app_uid() { # Start application before tracing start_trace_app - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_metadata_per_uid $SESSION_NAME enable_channel_per_uid $SESSION_NAME "channel0" enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0" diff --git a/tests/regression/ust/python-logging/test_python_logging b/tests/regression/ust/python-logging/test_python_logging index cb960daa8..610e8a642 100755 --- a/tests/regression/ust/python-logging/test_python_logging +++ b/tests/regression/ust/python-logging/test_python_logging @@ -90,7 +90,7 @@ function enable_python_filter_loglevel_only() function test_python_before_start () { diag "Test Python application BEFORE tracing starts" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_python_lttng_event $SESSION_NAME $EVENT_NAME # Run 5 times with a 1 second delay @@ -115,7 +115,7 @@ function test_python_after_start () { diag "Test Python application AFTER tracing starts" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_python_lttng_event $SESSION_NAME $EVENT_NAME start_lttng_tracing $SESSION_NAME @@ -136,7 +136,7 @@ function test_python_loglevel () { diag "Test Python application with loglevel" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_python_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "INFO" start_lttng_tracing $SESSION_NAME @@ -154,7 +154,7 @@ function test_python_loglevel () diag "Test Python applications with lower loglevel" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_python_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "CRITICAL" start_lttng_tracing $SESSION_NAME @@ -172,7 +172,7 @@ function test_python_loglevel () diag "Test Python applications with higher loglevel" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_python_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "DEBUG" start_lttng_tracing $SESSION_NAME @@ -191,7 +191,7 @@ function test_python_loglevel_multiple () { diag "Test Python application with multiple loglevel" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_python_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "INFO" enable_python_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "DEBUG" start_lttng_tracing $SESSION_NAME @@ -208,7 +208,7 @@ function test_python_loglevel_multiple () return $? fi - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_python_lttng_event_loglevel $SESSION_NAME '*' "INFO" enable_python_lttng_event_loglevel $SESSION_NAME '*' "DEBUG" start_lttng_tracing $SESSION_NAME @@ -230,11 +230,11 @@ function test_python_multi_session_loglevel() { diag "Test Python with multiple session" - create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 + create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 enable_python_loglevel_only $SESSION_NAME-1 '*' "INFO" start_lttng_tracing $SESSION_NAME-1 - create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 + create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 enable_python_loglevel_only $SESSION_NAME-2 '*' "DEBUG" start_lttng_tracing $SESSION_NAME-2 @@ -267,13 +267,13 @@ function test_python_multi_session_disable() { diag "Test Python with multiple session with disabled event" - create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 + create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 enable_python_lttng_event $SESSION_NAME-1 $EVENT_NAME enable_python_lttng_event $SESSION_NAME-1 $EVENT_NAME2 disable_python_lttng_event $SESSION_NAME-1 $EVENT_NAME start_lttng_tracing $SESSION_NAME-1 - create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 + create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 enable_python_lttng_event $SESSION_NAME-2 $EVENT_NAME2 start_lttng_tracing $SESSION_NAME-2 @@ -302,10 +302,10 @@ function test_python_multi_session_disable_wildcard() { diag "Test Python with multiple session with disabled wildcard event" - create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 + create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 enable_python_lttng_event $SESSION_NAME-1 '*' - create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 + create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 enable_python_lttng_event $SESSION_NAME-2 '*' disable_python_lttng_event $SESSION_NAME-1 '*' @@ -337,7 +337,7 @@ function test_python_disable_all() { diag "Test Python with multiple session with disabled all event" - create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME enable_python_lttng_event $SESSION_NAME '*' enable_python_lttng_event $SESSION_NAME $EVENT_NAME enable_python_lttng_event $SESSION_NAME $EVENT_NAME2 @@ -363,11 +363,11 @@ function test_python_multi_session() { diag "Test Python with multiple session" - create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 + create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1 enable_python_lttng_event $SESSION_NAME-1 $EVENT_NAME start_lttng_tracing $SESSION_NAME-1 - create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 + create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2 enable_python_lttng_event $SESSION_NAME-2 $EVENT_NAME2 start_lttng_tracing $SESSION_NAME-2 @@ -396,7 +396,7 @@ function test_python_destroy_session() { diag "Test Python two session with destroy" - create_lttng_session $SESSION_NAME $TRACE_PATH/first-sess + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/first-sess enable_python_lttng_event $SESSION_NAME $EVENT_NAME start_lttng_tracing $SESSION_NAME @@ -415,7 +415,7 @@ function test_python_destroy_session() return $? fi - create_lttng_session $SESSION_NAME $TRACE_PATH/second-sess + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/second-sess enable_python_lttng_event $SESSION_NAME $EVENT_NAME2 start_lttng_tracing $SESSION_NAME @@ -439,7 +439,7 @@ function test_python_filtering() { diag "Test Python filtering" - create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME # Enable all event with a filter. enable_python_filter $SESSION_NAME '*' 'msg == "python-ev-test2 fired"' start_lttng_tracing $SESSION_NAME @@ -456,7 +456,7 @@ function test_python_filtering() return $? fi - create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME # Enable first Logger but filter msg payload for the INFO one while # triggering the debug and second TP. enable_python_filter $SESSION_NAME $EVENT_NAME 'msg == "python-ev-test1 fired"' @@ -479,7 +479,7 @@ function test_python_disable() { diag "Test Python disable event" - create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME # Enable all event with a filter. enable_python_lttng_event $SESSION_NAME $EVENT_NAME enable_python_lttng_event $SESSION_NAME $EVENT_NAME2 @@ -503,7 +503,7 @@ function test_python_disable_enable() { diag "Test Python disable event followed by an enable" - create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME # Enable all event with a filter. enable_python_lttng_event $SESSION_NAME $EVENT_NAME disable_python_lttng_event $SESSION_NAME $EVENT_NAME @@ -531,7 +531,7 @@ function test_python_filter_loglevel() diag "Test Python a filter with a loglevel" - create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME + create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME # Enable an event with a filter and the loglevel-only option. enable_python_filter_loglevel_only $SESSION_NAME $BOGUS_EVENT_NAME "$FILTER" "INFO" disable_python_lttng_event $SESSION_NAME $BOGUS_EVENT_NAME diff --git a/tests/regression/ust/test_event_basic b/tests/regression/ust/test_event_basic index 3ff91b39e..2b043ef0d 100755 --- a/tests/regression/ust/test_event_basic +++ b/tests/regression/ust/test_event_basic @@ -68,8 +68,8 @@ function test_event_basic() EVENT_NAME2="ev2" EVENT_NAME3="ev3" - create_lttng_session $SESSION_NAME $TRACE_PATH - create_lttng_session $SESSION_NAME2 $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME2 $TRACE_PATH enable_ust_lttng_channel $SESSION_NAME $CHAN_NAME enable_ust_lttng_channel $SESSION_NAME2 $CHAN_NAME2 diff --git a/tests/regression/ust/test_event_perf b/tests/regression/ust/test_event_perf index 4e08ef08d..a2131a0db 100755 --- a/tests/regression/ust/test_event_perf +++ b/tests/regression/ust/test_event_perf @@ -58,7 +58,7 @@ function test_event_basic() SESSION_NAME="ust_event_basic" CHAN_NAME="mychan" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_ust_lttng_channel $SESSION_NAME $CHAN_NAME diff --git a/tests/regression/ust/test_event_tracef b/tests/regression/ust/test_event_tracef index c615b48d2..f3d00d495 100755 --- a/tests/regression/ust/test_event_tracef +++ b/tests/regression/ust/test_event_tracef @@ -37,7 +37,7 @@ fi function test_event_tracef() { - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_ust_lttng_event $SESSION_NAME $EVENT_NAME start_lttng_tracing $SESSION_NAME diff --git a/tests/regression/ust/test_event_wildcard b/tests/regression/ust/test_event_wildcard index 33ba4c4cc..1090b0ae1 100755 --- a/tests/regression/ust/test_event_wildcard +++ b/tests/regression/ust/test_event_wildcard @@ -37,7 +37,7 @@ function test_event_wildcard() EVENT_NAME="*" EVENT_NAME2="abc*" - create_lttng_session $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_ust_lttng_event $SESSION_NAME "$EVENT_NAME" enable_ust_lttng_event $SESSION_NAME "$EVENT_NAME2" diff --git a/tests/stress/test_multi_sessions_per_uid_10app b/tests/stress/test_multi_sessions_per_uid_10app index a86b72426..bf611d20b 100755 --- a/tests/stress/test_multi_sessions_per_uid_10app +++ b/tests/stress/test_multi_sessions_per_uid_10app @@ -78,7 +78,7 @@ test_stress() { for b in $(seq 1 $NR_LOOP); do for a in $(seq 1 $NR_SESSION); do - create_lttng_session $SESSION_NAME-$a $TRACE_PATH + create_lttng_session_ok $SESSION_NAME-$a $TRACE_PATH check_sessiond enable_channel_per_uid $SESSION_NAME-$a $CHANNEL_NAME check_sessiond diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index 5f86ece99..12dabc52c 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -368,13 +368,13 @@ function create_lttng_session_no_output () function create_lttng_session () { - local sess_name=$1 - local trace_path=$2 - local expected_to_fail=$3 + local expected_to_fail=$1 + local sess_name=$2 + local trace_path=$3 $TESTDIR/../src/bin/lttng/$LTTNG_BIN create $sess_name -o $trace_path > $OUTPUT_DEST ret=$? - if [[ $expected_to_fail ]]; then + if [[ $expected_to_fail -eq "1" ]]; then test "$ret" -ne "0" ok $? "Expected fail on session creation $sess_name in $trace_path" else @@ -382,6 +382,17 @@ function create_lttng_session () fi } +function create_lttng_session_ok () +{ + create_lttng_session 0 "$@" +} + +function create_lttng_session_fail () +{ + create_lttng_session 1 "$@" +} + + function enable_ust_lttng_channel() { local sess_name=$1