Refactor: test: wrapper for create_lttng_session
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 23 Apr 2015 20:32:19 +0000 (16:32 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 26 Jun 2015 21:12:00 +0000 (17:12 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
28 files changed:
tests/regression/kernel/test_all_events
tests/regression/kernel/test_event_basic
tests/regression/kernel/test_syscall
tests/regression/tools/exclusion/test_exclusion
tests/regression/tools/filtering/test_invalid_filter
tests/regression/tools/filtering/test_unsupported_op
tests/regression/tools/filtering/test_valid_filter
tests/regression/tools/mi/test_mi
tests/regression/tools/save-load/test_save
tests/regression/tools/tracefile-limits/test_tracefile_count
tests/regression/tools/tracefile-limits/test_tracefile_size
tests/regression/ust/before-after/test_before_after
tests/regression/ust/buffers-pid/test_buffers_pid
tests/regression/ust/high-throughput/test_high_throughput
tests/regression/ust/java-jul/test_java_jul
tests/regression/ust/java-log4j/test_java_log4j
tests/regression/ust/low-throughput/test_low_throughput
tests/regression/ust/multi-session/test_multi_session
tests/regression/ust/nprocesses/test_nprocesses
tests/regression/ust/overlap/test_overlap
tests/regression/ust/periodical-metadata-flush/test_periodical_metadata_flush
tests/regression/ust/python-logging/test_python_logging
tests/regression/ust/test_event_basic
tests/regression/ust/test_event_perf
tests/regression/ust/test_event_tracef
tests/regression/ust/test_event_wildcard
tests/stress/test_multi_sessions_per_uid_10app
tests/utils/utils.sh

index afd42ab39345bd4b8e4dc687277e596d43135f4d..63be154705b693dfcf59e17a08599987415d93e0 100755 (executable)
@@ -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
 
index a182f9f21565327885b75c0570b2b024e1ca3bf6..2906ec71ebddcf1b75e14564895fba8d23086459 100755 (executable)
@@ -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"
 
index a7800d2a1fede246cadeaaba7e70f423cd15392c..9fe599a1595e0b14ffa2fdfb20ba6efef4cf1453 100755 (executable)
@@ -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
index c1d76700ac61f9bc12091983f4b1adc1b33efa01..94f5251ba58f9d25b0aaec6779378e71e1e0a97d 100755 (executable)
@@ -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
 
index e566c8b72bc8b56fdf67f0f8cdbdb1189b87f1a3..c639ff172672b52154e8586586a7506a72340425 100755 (executable)
@@ -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"
index b5b7f27bb4a063a8ebe7c9d685555bb93c04be93..d60814922540bcb7bb45519ed042db83122bdace 100755 (executable)
@@ -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
index 4d8d2afff5c1d7b1ab69b9089e8c3b5b81324dd5..b2254b3e61f5242b61151b80a5a561a7bab01d20 100755 (executable)
@@ -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
index c44b598e5720983600d4aa98ad0dd0e5fbc34fff..620b53cf778cbcc96b6ff5e07e3910d14cb56080 100755 (executable)
@@ -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
index 9132b5a05ee0dc5995f6183c388b2e0602c8a341..abb2c5684e9ea08cb65ec11a24f09a51ef58e42a 100755 (executable)
@@ -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
 
index df1cdceaf49aede055b1f56171bf626d768d288d..8dfcbad739a3b7fe4c33a6f6e38cd868dc4b2c9d 100755 (executable)
@@ -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
index 92144ebb740129ab3a8a7c3e7c8ccb5801009d30..1583c9519a74357349d022f5dbd285c58ba231e8 100755 (executable)
@@ -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
index 460b04c4e9e6f09fe657a9d05bb94a47622b5a21..0b2812415568a01adffb34793d324a068d1eddcc 100755 (executable)
@@ -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} &
index c95a4a1f9f7c4acb9a51210f00db3ee531f0a255..b397fc11359cc36f88d3c2ffb663fc14d6366437 100755 (executable)
@@ -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"
index 1ee0ec10f6f1857dae35dfd909816aa0009db52e..dcd2f71a7af72fe5715c7362256abcfc193ed8ae 100755 (executable)
@@ -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
index d32d9ed4564e9901b639b0588f2f3bdf217e6f61..4835e3dcd6885eae79c020329fa85c7134293e9c 100755 (executable)
@@ -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
index a0b7cdc0f9592bb6a5d567ed71e1183fead22f23..77df00a792b37ef489940eacfca97ef0e09973ba 100755 (executable)
@@ -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
index 1ca3c38d072d5f116741d3ebf40cd407d503c740..92d739dd4dec7fe255ab34c4d784fc81afcb7e4a 100755 (executable)
@@ -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
index e1ff9b09124c93f27868b24f0302e702b400ca9c..63ed54def122c6b701a021f476bd30365bbbebd1 100755 (executable)
@@ -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
index 8eed95fcaa911f8f437f63d26a536302f3155b1d..a9b9db2766815d2a0747285a92d4187b49426310 100755 (executable)
@@ -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
index 3a8af98a72f18343493cd6e737b1c90b95c4e3f0..8300fbf7cf3c740dd8181d0f386597152233aa8b 100755 (executable)
@@ -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]}
index 7937fa27dd3a9e22e253404df6ec462768670eda..cbfe1a9e6be50cf64efbc412c1e661c50b34ec9a 100755 (executable)
@@ -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"
index cb960daa86d172cdbe931447a9013d0cb06f93d8..610e8a642baacf172b55ea9b274329d63749017b 100755 (executable)
@@ -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
index 3ff91b39e5dee70e2a6d37758f946b6de7470215..2b043ef0dafba08201e4bfa7238845a060676dc4 100755 (executable)
@@ -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
index 4e08ef08d109ea61ac27eb88549ed622ce624d5f..a2131a0db2ab9b1bd4b186789e4838140beb034c 100755 (executable)
@@ -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
 
index c615b48d2e2659caf03fc22a1ae5b4d7cf597bf3..f3d00d495adb8a54a92f7e4fa21e5e44e6e7801c 100755 (executable)
@@ -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
 
index 33ba4c4cc3b8a6b4d691d99c0b3085f8ac6c5cff..1090b0ae1b7df41a62d7124648e7063d5036f12a 100755 (executable)
@@ -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"
index a86b72426b8585c9117a71fe41ddf8f771449181..bf611d20b3ecbdecc1e481adad39ed799bebe4aa 100755 (executable)
@@ -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
index 5f86ece9984e0aacbadc935e9bb098f2f83601c7..12dabc52ccd87a9bbd17372511186198fdcd0790 100644 (file)
@@ -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
This page took 0.051355 seconds and 4 git commands to generate.