Refactor: test: wrapper for start_lttng_tracing
[lttng-tools.git] / tests / regression / tools / snapshots / test_ust_streaming
index 52330a5c9f8362b1625cbe05f17b71a257c5edbf..4dcac4a16a6c8c25aa77218a3afcf30f7c296e0a 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,8 +91,8 @@ 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
-       start_lttng_tracing $SESSION_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+       start_lttng_tracing_ok $SESSION_NAME
 
        start_test_app
 
@@ -131,8 +132,8 @@ 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
-       start_lttng_tracing $SESSION_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+       start_lttng_tracing_ok $SESSION_NAME
 
        start_test_app
 
@@ -154,8 +155,8 @@ 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
-       start_lttng_tracing $SESSION_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+       start_lttng_tracing_ok $SESSION_NAME
 
        start_test_app
 
@@ -181,8 +182,8 @@ 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
-       start_lttng_tracing $SESSION_NAME
+       enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+       start_lttng_tracing_ok $SESSION_NAME
 
        start_test_app
 
This page took 0.02456 seconds and 4 git commands to generate.