Cleanup: tests: name all temporary files to better identify leakage
[lttng-tools.git] / tests / regression / tools / save-load / test_load
index 4f18dec2d8a052342dd3e45619bac2178b0df84f..3cf0cc50126146c858f4cd80fb4f8a11ce3267a0 100755 (executable)
@@ -58,7 +58,7 @@ function test_complex_load()
        disable_ust_lttng_channel $sess chan3
 
        # Confirm that an event stored as disabled is restored in its disabled state
-       local mi_output_file=$(mktemp)
+       local mi_output_file=$(mktemp --tmpdir "tmp.${FUNCNAME[0]}_output_file.XXXXXX")
        if [ $? -ne 0 ]; then
                break;
        fi
@@ -127,7 +127,7 @@ function test_trackers()
        lttng_load_ok "-i $CURDIR/$SESSION_NAME-trackers.lttng"
 
        diag "Test pid tracker"
-       local mi_output_file=$(mktemp)
+       local mi_output_file=$(mktemp --tmpdir "tmp.${FUNCNAME[0]}_output_file.XXXXXX")
        if [ $? -ne 0 ]; then
                break;
        fi
@@ -176,7 +176,7 @@ function test_override_url_normal()
 
        start_lttng_relayd "-C tcp://127.0.0.1:8172 -D tcp://127.0.0.1:9817"
 
-       local mi_output_file=$(mktemp)
+       local mi_output_file=$(mktemp --tmpdir "tmp.${FUNCNAME[0]}_output_file.XXXXXX")
        if [ $? -ne 0 ]; then
                break;
        fi
@@ -226,7 +226,7 @@ function test_override_url_snapshot()
 
        start_lttng_relayd "-C tcp://127.0.0.1:8172 -D tcp://127.0.0.1:9817"
 
-       local mi_output_file=$(mktemp)
+       local mi_output_file=$(mktemp --tmpdir "tmp.${FUNCNAME[0]}_output_file.XXXXXX")
        if [ $? -ne 0 ]; then
                break;
        fi
@@ -280,7 +280,7 @@ function test_override_url_live()
 
        start_lttng_relayd "-C tcp://127.0.0.1:8172 -D tcp://127.0.0.1:9817"
 
-       local mi_output_file=$(mktemp)
+       local mi_output_file=$(mktemp --tmpdir "tmp.${FUNCNAME[0]}_output_file.XXXXXX")
        if [ $? -ne 0 ]; then
                break;
        fi
@@ -316,7 +316,7 @@ function test_override_session_name()
        local override_name="PinkyAndTheBrain"
        local output_path="/tmp/lttng/load-42-1"
 
-       local mi_output_file=$(mktemp)
+       local mi_output_file=$(mktemp --tmpdir "tmp.${FUNCNAME[0]}_output_file.XXXXXX")
        if [ $? -ne 0 ]; then
                break;
        fi
@@ -362,7 +362,7 @@ TESTS=(
 
 for fct_test in ${TESTS[@]};
 do
-       TRACE_PATH=$(mktemp -d)
+       TRACE_PATH=$(mktemp --tmpdir -d tmp.test_load_trace_path.XXXXXX)
 
        ${fct_test}
        if [ $? -ne 0 ]; then
This page took 0.027345 seconds and 4 git commands to generate.