Refactor: test: wrapper for enable_ust_lttng_event
[lttng-tools.git] / tests / regression / tools / snapshots / test_ust_streaming
index 52330a5c9f8362b1625cbe05f17b71a257c5edbf..3041715ff082a202879c1a269e7f6a2bae4c5989 100755 (executable)
@@ -58,7 +58,7 @@ function snapshot_add_output ()
 # Start trace application and return once one event has been hit.
 function start_test_app()
 {
-       local tmp_file="/tmp/lttng_test_ust.42.file"
+       local tmp_file=$(mktemp -u)
 
        # Start application with a temporary file.
        $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT $tmp_file &
@@ -80,8 +80,9 @@ function stop_test_apps()
        diag "Stopping $TESTAPP_NAME"
        for p in ${APPS_PID}; do
                kill ${p}
-               wait ${p} 2>&1
+               wait ${p} 2>/dev/null
        done
+       APPS_PID=
 }
 
 # Test a snapshot using a default name for the output destination.
@@ -90,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
@@ -131,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
@@ -154,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
@@ -181,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
This page took 0.02736 seconds and 5 git commands to generate.