Refactor: test: wrapper for enable_ust_lttng_event
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 24 Apr 2015 17:50:04 +0000 (13:50 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 26 Jun 2015 21:33:11 +0000 (17:33 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
23 files changed:
tests/regression/tools/health/test_health.sh
tests/regression/tools/health/test_thread_ok
tests/regression/tools/live/test_lttng_ust
tests/regression/tools/mi/test_mi
tests/regression/tools/save-load/test_save
tests/regression/tools/snapshots/test_ust_streaming
tests/regression/tools/snapshots/ust_test
tests/regression/tools/streaming/test_high_throughput_limits
tests/regression/tools/streaming/test_ust
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/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/test_event_tracef
tests/regression/ust/test_event_wildcard
tests/stress/test_multi_sessions_per_uid_10app
tests/stress/test_multi_sessions_per_uid_5app_streaming
tests/stress/test_multi_sessions_per_uid_5app_streaming_kill_relayd
tests/utils/utils.sh

index 6ae8885d040953f0002e93ff215e6d7ae902905c..5010a9136b7ee94ec7cc13e9bf07f68826676b25 100644 (file)
@@ -104,7 +104,7 @@ function test_health
                create_lttng_session_no_output $SESSION_NAME
 
                diag "With UST consumer daemons"
-               enable_ust_lttng_event $SESSION_NAME $UST_EVENT_NAME $CHANNEL_NAME
+               enable_ust_lttng_event_ok $SESSION_NAME $UST_EVENT_NAME $CHANNEL_NAME
 
                skip $isroot "Root access is needed. Skipping kernel consumer health check test." "1" ||
                {
index add9c0ced96acf39ed1644fc1c21e0c5d9e2de80..62be3bac32196ee86cab909a11f49e12f89c10ca 100755 (executable)
@@ -79,7 +79,7 @@ function test_thread_ok
 
        diag "With UST consumer daemons"
        create_lttng_session_no_output $SESSION_NAME
-       enable_ust_lttng_event $SESSION_NAME $UST_EVENT_NAME $CHANNEL_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $UST_EVENT_NAME $CHANNEL_NAME
        start_lttng_tracing $SESSION_NAME
        destroy_lttng_session $SESSION_NAME
 
index da9bf9e6649043765008dc9a5bbe197373e02a65..177b1f76ac98ed2cff325ec0127baa795340ec43 100755 (executable)
@@ -62,7 +62,7 @@ function setup_live_tracing()
                -U net://localhost >/dev/null 2>&1
        ok $? "Create session in live mode with delay $DELAY_USEC"
 
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
        start_lttng_tracing $SESSION_NAME
 }
 
index 6ec2760cd0f3cd6a4614f0cdec86938d1abbab3f..3f5f4b5f5ce87051cb90778fef3d88522c74b132 100755 (executable)
@@ -305,13 +305,13 @@ function test_ust_lttng_event ()
 
        OUTPUT_DEST=$OUTPUT_DIR/$OUTPUT_FILE
        #Test the enable event for ust domain
-       enable_ust_lttng_event $session_name ${event[0]} $channel_name
+       enable_ust_lttng_event_ok $session_name ${event[0]} $channel_name
        $XML_VALIDATE $OUTPUT_DEST
        ok $? "Mi test: Enable_event for ust domain xsd validation"
        is_command_success $OUTPUT_DEST false
 
        #Try to reenable an enabled event. Should fail
-       enable_ust_lttng_event $session_name ${event[0]} $channel_name true
+       enable_ust_lttng_event_fail $session_name ${event[0]} $channel_name
        $XML_VALIDATE $OUTPUT_DEST
        ok $? "Mi test: Fail enable_event for ust domain xsd validation"
        is_command_success $OUTPUT_DEST true
@@ -324,7 +324,7 @@ function test_ust_lttng_event ()
        #Event[*] print all the element inside the array with the IFS in between
        concat_event=$( IFS=$','; echo "${event[*]}" )
 
-       enable_ust_lttng_event $session_name $concat_event $channel_name true
+       enable_ust_lttng_event_fail $session_name $concat_event $channel_name
        $XML_VALIDATE $OUTPUT_DEST
        ok $? "Mi test: Multiple enable ust event with inside fail xsd validation"
 
@@ -377,7 +377,7 @@ function test_list_channel ()
 
        #Enable ust and jul events
        concat_event=$( IFS=$','; echo "${event[*]}" )
-       enable_ust_lttng_event $session_name $concat_event $channel_name
+       enable_ust_lttng_event_ok $session_name $concat_event $channel_name
 
        #Begin testing
        OUTPUT_DEST=$OUTPUT_DIR/$OUTPUT_FILE
@@ -424,7 +424,7 @@ function test_list_domain ()
 
        #Enable ust and jul events
        concat_event=$( IFS=$','; echo "${event[*]}" )
-       enable_ust_lttng_event $session_name $concat_event $channel_name
+       enable_ust_lttng_event_ok $session_name $concat_event $channel_name
        enable_jul_lttng_event $session_name $concat_event $channel_name
 
        #Begin testing
@@ -472,7 +472,7 @@ function test_list_session ()
 
        #Enable ust and jul events
        concat_event=$( IFS=$','; echo "${event[*]}" )
-       enable_ust_lttng_event $session_name $concat_event $channel_name
+       enable_ust_lttng_event_ok $session_name $concat_event $channel_name
        enable_jul_lttng_event $session_name $concat_event $channel_name
 
        #Begin testing
index 2994c9f6c695b6d121be04877b4e00eb76236c48..299776fba121b29d9466d6105f8fd490aaed7c6d 100755 (executable)
@@ -67,7 +67,7 @@ function test_basic_save()
 
        create_lttng_session_ok $SESSION_NAME $TRACE_PATH
        enable_ust_lttng_channel_ok $SESSION_NAME $CHANNEL_NAME
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
 
        lttng_save $SESSION_NAME "-o $TRACE_PATH"
 
@@ -88,9 +88,9 @@ function test_basic_save_all()
        enable_ust_lttng_channel_ok $SESSION_NAME-2 $CHANNEL_NAME
        enable_ust_lttng_channel_ok $SESSION_NAME-3 $CHANNEL_NAME
 
-       enable_ust_lttng_event $SESSION_NAME-1 $EVENT_NAME $CHANNEL_NAME
-       enable_ust_lttng_event $SESSION_NAME-2 $EVENT_NAME $CHANNEL_NAME
-       enable_ust_lttng_event $SESSION_NAME-3 $EVENT_NAME $CHANNEL_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME-1 $EVENT_NAME $CHANNEL_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME-2 $EVENT_NAME $CHANNEL_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME-3 $EVENT_NAME $CHANNEL_NAME
 
        lttng_save "" "-a -o $TRACE_PATH"
 
@@ -109,7 +109,7 @@ function test_overwrite()
 
        create_lttng_session_ok $SESSION_NAME $TRACE_PATH
        enable_ust_lttng_channel_ok $SESSION_NAME $CHANNEL_NAME
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
 
        lttng_save $SESSION_NAME "-o $TRACE_PATH"
 
@@ -120,7 +120,7 @@ function test_overwrite()
        # Create a new session with same name so we can force the overwrite
        create_lttng_session_ok $SESSION_NAME $TRACE_PATH
        enable_ust_lttng_channel_ok $SESSION_NAME $CHANNEL_NAME
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
 
        # This one MUST fail
        save_lttng_fail $SESSION_NAME "-o $TRACE_PATH"
index ef38bd59914d2d648a1b92b17e38f4c0cd5e8bd4..3041715ff082a202879c1a269e7f6a2bae4c5989 100755 (executable)
@@ -91,7 +91,7 @@ function test_ust_default_name_with_del()
        diag "Test UST snapshot streaming with default name with delete output"
        create_lttng_session_no_output $SESSION_NAME
        enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
        start_lttng_tracing $SESSION_NAME
 
        start_test_app
@@ -132,7 +132,7 @@ function test_ust_default_name()
        diag "Test UST snapshot streaming with default name"
        create_lttng_session_no_output $SESSION_NAME
        enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
        start_lttng_tracing $SESSION_NAME
 
        start_test_app
@@ -155,7 +155,7 @@ function test_ust_default_name_custom_uri()
        diag "Test UST snapshot streaming with default name with custom URL"
        create_lttng_session_no_output $SESSION_NAME
        enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
        start_lttng_tracing $SESSION_NAME
 
        start_test_app
@@ -182,7 +182,7 @@ function test_ust_custom_name()
        diag "Test UST snapshot streaming with custom name"
        create_lttng_session_no_output $SESSION_NAME
        enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
        start_lttng_tracing $SESSION_NAME
 
        start_test_app
index e839b84bfa364590e8fb054cbf3791939b3587bb..61c364f68319bb480b784681d815abbbe7bc63f2 100755 (executable)
@@ -130,7 +130,7 @@ function test_ust_list_output ()
        diag "Test UST snapshot output listing"
        create_lttng_session_no_output $SESSION_NAME
        enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
 
        start_lttng_tracing $SESSION_NAME
 
@@ -158,7 +158,7 @@ function test_ust_local_snapshot ()
        diag "Test local UST snapshots"
        create_lttng_session_no_output $SESSION_NAME
        enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
        start_lttng_tracing $SESSION_NAME
        lttng_snapshot_add_output $SESSION_NAME $TRACE_PATH
 
@@ -192,7 +192,7 @@ function test_ust_local_snapshot_max_size ()
 
        enable_mmap_overwrite_subbuf_ust_channel $SESSION_NAME $CHANNEL_NAME $subbuf_size
 
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
        start_lttng_tracing $SESSION_NAME
 
        snapshot_add_output $SESSION_NAME "file://$TRACE_PATH" "" $max_size
@@ -237,7 +237,7 @@ function test_ust_local_snapshot_large_metadata ()
        diag "Test local UST snapshots with > 4kB metadata"
        create_lttng_session_no_output $SESSION_NAME
        enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
-       enable_ust_lttng_event $SESSION_NAME $LM_EVENT $CHANNEL_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $LM_EVENT $CHANNEL_NAME
        start_lttng_tracing $SESSION_NAME
        lttng_snapshot_add_output $SESSION_NAME $TRACE_PATH
        $LM_BIN 1 1
@@ -268,7 +268,7 @@ function test_ust_per_uid_local_snapshot ()
        diag "Test local UST snapshots"
        create_lttng_session_no_output $SESSION_NAME
        enable_channel_per_uid_mmap_overwrite $SESSION_NAME $CHANNEL_NAME
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
        start_lttng_tracing $SESSION_NAME
        lttng_snapshot_add_output $SESSION_NAME $TRACE_PATH
 
@@ -294,7 +294,7 @@ function test_ust_per_uid_local_snapshot_post_mortem ()
        diag "Test local UST snapshots post-mortem"
        create_lttng_session_no_output $SESSION_NAME
        enable_channel_per_uid_mmap_overwrite $SESSION_NAME $CHANNEL_NAME
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
        start_lttng_tracing $SESSION_NAME
        lttng_snapshot_add_output $SESSION_NAME $TRACE_PATH
 
@@ -319,7 +319,7 @@ function test_ust_local_snapshots ()
        diag "Test $NR_SNAPSHOT local UST snapshots"
        create_lttng_session_no_output $SESSION_NAME
        enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
        start_lttng_tracing $SESSION_NAME
        lttng_snapshot_add_output $SESSION_NAME $TRACE_PATH
 
index 9f754713c8a91942910df84aac1ccec09338ce3f..f2bf7426c07f31bc0960600f0e1a205eb4d06dcd 100755 (executable)
@@ -99,7 +99,7 @@ function test_high_throughput
 {
        NETWORK_URI="net://localhost"
        create_lttng_session_with_uri $SESSION_NAME $NETWORK_URI
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
        start_lttng_tracing $SESSION_NAME
        run_apps
        diag "Waiting for applications to end"
index e6a0bb846569117ee4add0fb11215cd022120653..51656e4be952444de49dbb46c1fff035b641a815 100755 (executable)
@@ -54,7 +54,7 @@ function test_ust_before_start ()
 
        diag "Test UST streaming BEFORE tracing starts"
        lttng_create_session_uri
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
 
        # Run 5 times with a 1 second delay
        $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT ${file_sync_after_first} ${file_sync_before_last} /dev/null 2>&1 &
@@ -78,7 +78,7 @@ function test_ust_after_start ()
 
        diag "Test UST streaming AFTER tracing starts"
        lttng_create_session_uri
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
        start_lttng_tracing $SESSION_NAME
 
        # Run 5 times with a 1 second delay
index 0b2812415568a01adffb34793d324a068d1eddcc..12c5e30bc848cf1b19c7810a979ca084c18210ab 100755 (executable)
@@ -39,7 +39,7 @@ function test_before_apps()
 {
        # BEFORE application is spawned
        create_lttng_session_ok $SESSION_NAME $TRACE_PATH
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
        start_lttng_tracing $SESSION_NAME
 
        $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT &
@@ -61,7 +61,7 @@ function test_after_apps()
        local file_sync_before_last=$(mktemp -u)
 
        create_lttng_session_ok $SESSION_NAME $TRACE_PATH
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
 
        $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT ${file_sync_after_first} ${file_sync_before_last} &
        ok $? "Application started in background."
index b397fc11359cc36f88d3c2ffb663fc14d6366437..dd5b367b13645ff5180fa48f0dfada654dcf3c0e 100755 (executable)
@@ -54,7 +54,7 @@ test_after_multiple_apps() {
        # BEFORE application is spawned
        create_lttng_session_ok $SESSION_NAME $TRACE_PATH
        enable_channel_per_pid $SESSION_NAME "channel0"
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0"
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME "channel0"
        start_lttng_tracing $SESSION_NAME
 
        for i in `seq 1 5`; do
@@ -87,7 +87,7 @@ test_before_multiple_apps() {
        # BEFORE application is spawned
        create_lttng_session_ok $SESSION_NAME $TRACE_PATH
        enable_channel_per_pid $SESSION_NAME "channel0"
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0"
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME "channel0"
        start_lttng_tracing $SESSION_NAME
 
        for i in `seq 1 5`; do
@@ -128,7 +128,7 @@ test_after_app() {
        # BEFORE application is spawned
        create_lttng_session_ok $SESSION_NAME $TRACE_PATH
        enable_channel_per_pid $SESSION_NAME "channel0"
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0"
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME "channel0"
        start_lttng_tracing $SESSION_NAME
 
        $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT &
@@ -154,7 +154,7 @@ test_before_app() {
        # BEFORE application is spawned
        create_lttng_session_ok $SESSION_NAME $TRACE_PATH
        enable_channel_per_pid $SESSION_NAME "channel0"
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0"
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME "channel0"
 
        $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT ${file_sync_after_first} ${file_sync_before_last} &
        ok $? "Start application to trace"
index dcd2f71a7af72fe5715c7362256abcfc193ed8ae..41ae6118cc33dfec3cd681e5413fe9a9f65bf7fe 100755 (executable)
@@ -42,7 +42,7 @@ start_lttng_sessiond
 
 create_lttng_session_ok $SESSION_NAME $TRACE_PATH
 
-enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
 start_lttng_tracing $SESSION_NAME
 
 for i in `seq 1 $NR_APP`; do
index 92d739dd4dec7fe255ab34c4d784fc81afcb7e4a..53299489dd47d17e164d008761a7513c9dde1687 100755 (executable)
@@ -41,7 +41,7 @@ start_lttng_sessiond
 
 create_lttng_session_ok $SESSION_NAME $TRACE_PATH
 
-enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
 start_lttng_tracing $SESSION_NAME
 
 # This is going to take 20 minutes
index 63ed54def122c6b701a021f476bd30365bbbebd1..c2b7b946b6c56601e920bfe3278449105afbe11a 100755 (executable)
@@ -37,7 +37,7 @@ test_multi_session() {
        # BEFORE application is spawned
        for i in `seq 0 3`; do
                create_lttng_session_ok "$SESSION_NAME-$i" "$TRACE_PATH/$i"
-               enable_ust_lttng_event "$SESSION_NAME-$i" "$EVENT_NAME$i"
+               enable_ust_lttng_event_ok "$SESSION_NAME-$i" "$EVENT_NAME$i"
                start_lttng_tracing "$SESSION_NAME-$i"
        done
 
index a9b9db2766815d2a0747285a92d4187b49426310..e5e27226ce91104e92009d3525388638a863786e 100755 (executable)
@@ -70,7 +70,7 @@ TRACE_PATH=$(mktemp -d)
 
 create_lttng_session_ok $SESSION_NAME $TRACE_PATH
 
-enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
 start_lttng_tracing $SESSION_NAME
 
 touch ${file_sync_before_last}
index 8300fbf7cf3c740dd8181d0f386597152233aa8b..ab853f31ae7b4927ccfa488bcab1ff9c6283d4ab 100755 (executable)
@@ -84,8 +84,8 @@ test_enable_simple_wildcard()
 
        diag "Simple wildcard overlap"
 
-       enable_ust_lttng_event $SESSION_NAME "$event_wild1"
-       enable_ust_lttng_event $SESSION_NAME "$event_wild2"
+       enable_ust_lttng_event_ok $SESSION_NAME "$event_wild1"
+       enable_ust_lttng_event_ok $SESSION_NAME "$event_wild2"
 
        start_lttng_tracing $SESSION_NAME
 
@@ -417,9 +417,9 @@ test_enable_bad_wildcard()
 
        diag "Enable bad wildcard"
 
-       enable_ust_lttng_event $SESSION_NAME "$event_wild1"
-       enable_ust_lttng_event $SESSION_NAME "$event_wild2"
-       enable_ust_lttng_event $SESSION_NAME "$event_wild3"
+       enable_ust_lttng_event_ok $SESSION_NAME "$event_wild1"
+       enable_ust_lttng_event_ok $SESSION_NAME "$event_wild2"
+       enable_ust_lttng_event_ok $SESSION_NAME "$event_wild3"
 
        start_lttng_tracing $SESSION_NAME
 
@@ -439,8 +439,8 @@ test_enable_simple_wildcard_2()
 
        diag "Simple wildcard 2"
 
-       enable_ust_lttng_event $SESSION_NAME "$event_wild1"
-       enable_ust_lttng_event $SESSION_NAME "$event_wild2"
+       enable_ust_lttng_event_ok $SESSION_NAME "$event_wild1"
+       enable_ust_lttng_event_ok $SESSION_NAME "$event_wild2"
 
        start_lttng_tracing $SESSION_NAME
 
@@ -568,8 +568,8 @@ test_disable_simple_wildcard()
 
        diag "Disable simple wildcard"
 
-       enable_ust_lttng_event $SESSION_NAME "$event_wild1"
-       enable_ust_lttng_event $SESSION_NAME "$event_wild2"
+       enable_ust_lttng_event_ok $SESSION_NAME "$event_wild1"
+       enable_ust_lttng_event_ok $SESSION_NAME "$event_wild2"
 
        disable_ust_lttng_event $SESSION_NAME "$event_wild1"
        disable_ust_lttng_event $SESSION_NAME "$event_wild2"
@@ -593,8 +593,8 @@ test_disable_wildcard_overlap()
 
        diag "Disable wildcard overlap"
 
-       enable_ust_lttng_event $SESSION_NAME "$event_wild1"
-       enable_ust_lttng_event $SESSION_NAME "$event_wild2"
+       enable_ust_lttng_event_ok $SESSION_NAME "$event_wild1"
+       enable_ust_lttng_event_ok $SESSION_NAME "$event_wild2"
 
        disable_ust_lttng_event $SESSION_NAME "$event_wild1"
 
index cbfe1a9e6be50cf64efbc412c1e661c50b34ec9a..e8f695fedf5c1b155ac56ecf38a56652b9e5aeb2 100755 (executable)
@@ -137,7 +137,7 @@ test_after_app_pid() {
        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"
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME "channel0"
        start_lttng_tracing $SESSION_NAME
 
        # Start application after tracing
@@ -183,7 +183,7 @@ test_before_app_pid() {
        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"
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME "channel0"
        start_lttng_tracing $SESSION_NAME
 
        check_app_tmp_file
@@ -226,7 +226,7 @@ test_after_app_uid() {
        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"
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME "channel0"
        start_lttng_tracing $SESSION_NAME
 
        # Start application after tracing
@@ -272,7 +272,7 @@ test_before_app_uid() {
        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"
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME "channel0"
        start_lttng_tracing $SESSION_NAME
 
        check_app_tmp_file
index f3d00d495adb8a54a92f7e4fa21e5e44e6e7801c..b63ee218c27a3d6a1e920d531fc9e5099ceda9b6 100755 (executable)
@@ -38,7 +38,7 @@ fi
 function test_event_tracef()
 {
        create_lttng_session_ok $SESSION_NAME $TRACE_PATH
-       enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
        start_lttng_tracing $SESSION_NAME
 
        $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT
index 1090b0ae1b7df41a62d7124648e7063d5036f12a..29aceff26926fa0431656230e1a306564acc3820 100755 (executable)
@@ -39,8 +39,8 @@ function test_event_wildcard()
 
        create_lttng_session_ok $SESSION_NAME $TRACE_PATH
 
-       enable_ust_lttng_event $SESSION_NAME "$EVENT_NAME"
-       enable_ust_lttng_event $SESSION_NAME "$EVENT_NAME2"
+       enable_ust_lttng_event_ok $SESSION_NAME "$EVENT_NAME"
+       enable_ust_lttng_event_ok $SESSION_NAME "$EVENT_NAME2"
 
        start_lttng_tracing
        stop_lttng_tracing
index bf611d20b3ecbdecc1e481adad39ed799bebe4aa..91950be0e071903cf72177005f97a29c3c52e41d 100755 (executable)
@@ -82,7 +82,7 @@ test_stress()
                        check_sessiond
                        enable_channel_per_uid $SESSION_NAME-$a $CHANNEL_NAME
                        check_sessiond
-                       enable_ust_lttng_event $SESSION_NAME-$a $EVENT_NAME
+                       enable_ust_lttng_event_ok $SESSION_NAME-$a $EVENT_NAME
                        check_sessiond
                        start_lttng_tracing $SESSION_NAME-$a
                        check_sessiond
index 36a15d92e8a545011e202aedbb944f03239603d7..ec6d9af293fe5d51a63c8f04695bd64818a994cd 100755 (executable)
@@ -117,7 +117,7 @@ test_stress()
                        enable_channel_per_uid $SESSION_NAME-$a $CHANNEL_NAME
                        check_sessiond
                        check_relayd
-                       enable_ust_lttng_event $SESSION_NAME-$a $EVENT_NAME
+                       enable_ust_lttng_event_ok $SESSION_NAME-$a $EVENT_NAME
                        check_sessiond
                        check_relayd
                        start_lttng_tracing $SESSION_NAME-$a
index e01e6aaf8c80906a019680e5f520bc42a4c14245..c3fdeb13da933a0144cd9098640733eb2157c55c 100755 (executable)
@@ -119,7 +119,7 @@ test_stress()
                        enable_channel_per_uid $SESSION_NAME-$a $CHANNEL_NAME
                        check_sessiond
                        check_relayd
-                       enable_ust_lttng_event $SESSION_NAME-$a $EVENT_NAME
+                       enable_ust_lttng_event_ok $SESSION_NAME-$a $EVENT_NAME
                        check_sessiond
                        check_relayd
                        start_lttng_tracing $SESSION_NAME-$a
index f44a7376f2a46ae0212a36c3f690447597db1808..a8e0e4a0721926a9b183487b634d4b6812dae1c0 100644 (file)
@@ -448,10 +448,10 @@ function enable_lttng_mmap_overwrite_ust_channel()
 
 function enable_ust_lttng_event ()
 {
-       local sess_name=$1
-       local event_name="$2"
-       local channel_name=$3
-       local expected_to_fail=$4
+       local expected_to_fail=$1
+       local sess_name=$2
+       local event_name="$3"
+       local channel_name=$4
 
        if [ -z $channel_name ]; then
                # default channel if none specified
@@ -462,7 +462,7 @@ function enable_ust_lttng_event ()
 
        $TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-event "$event_name" $chan -s $sess_name -u >$OUTPUT_DEST
        ret=$?
-       if [[ $expected_to_fail ]]; then
+       if [[ $expected_to_fail -eq "1" ]]; then
                test $ret -ne "0"
                ok $? "Enable ust event $event_name for session $session_name on channel $channel_name failed as expected"
        else
@@ -470,6 +470,16 @@ function enable_ust_lttng_event ()
        fi
 }
 
+function enable_ust_lttng_event_ok ()
+{
+       enable_ust_lttng_event 0 "$@"
+}
+
+function enable_ust_lttng_event_fail ()
+{
+       enable_ust_lttng_event 1 "$@"
+}
+
 function enable_jul_lttng_event()
 {
        sess_name=$1
This page took 0.058673 seconds and 4 git commands to generate.