Tests: remove leftover temporary files
[lttng-tools.git] / tests / regression / tools / exclusion / test_exclusion
index ce5e988e5e395ca1b410c9071ec12ef867d00be3..00e364025e40655f216400dd1da47e6908746ca1 100755 (executable)
@@ -40,7 +40,7 @@ function run_apps
 # of our test suite to generate events.
 function dry_run
 {
-       trace_path=$(mktemp -d)
+       local trace_path=$(mktemp --tmpdir -d "tmp.${FUNCNAME[0]}_trace_path.XXXXXX")
 
        # Create session
        create_lttng_session_ok $SESSION_NAME $trace_path
@@ -68,9 +68,9 @@ function dry_run
 
 function test_exclusion
 {
-       exclusions="$1"
-       event_name_expected_to_be_missing="$2"
-       trace_path=$(mktemp -d)
+       local exclusions="$1"
+       local event_name_expected_to_be_missing="$2"
+       local trace_path=$(mktemp --tmpdir -d "tmp.${FUNCNAME[0]}_trace_path.XXXXXX")
 
        # Create session
        create_lttng_session_ok $SESSION_NAME $trace_path
@@ -99,9 +99,9 @@ function test_exclusion_tracing_started
 {
        local exclusions="$1"
        local event_name_expected_to_be_missing="$2"
-       local trace_path=$(mktemp -d)
-       local file_wait_before_first=$(mktemp -u)
-       local file_create_in_main=$(mktemp -u)
+       local trace_path=$(mktemp --tmpdir -d "tmp.${FUNCNAME[0]}_trace_path.XXXXXX")
+       local file_wait_before_first=$(mktemp --tmpdir -u "tmp.${FUNCNAME[0]}_sync_before_first.XXXXXX")
+       local file_create_in_main=$(mktemp --tmpdir -u "tmp.${FUNCNAME[0]}_sync_create_in_main.XXXXXX")
 
        # Create session
        create_lttng_session_ok $SESSION_NAME $trace_path
@@ -146,6 +146,9 @@ function test_exclusion_tracing_started
                ok 0 "Validate trace exclusion output"
                rm -rf $trace_path
        fi
+
+       rm -f $file_wait_before_first
+       rm -f $file_create_in_main
 }
 
 function test_exclusion_fail
This page took 0.02455 seconds and 4 git commands to generate.