Cleanup: tests: name all temporary files to better identify leakage
[lttng-tools.git] / tests / regression / kernel / test_callstack
index 42c3fcce404195accc5c047113900ad41d3a6d88..b5759d442d1670f158e01ec4603eca4a884cd13a 100755 (executable)
@@ -36,8 +36,7 @@ function run_workload()
        # shift the first argument, passing along the other args if any to the
        # test app.
        shift
-       local start_file_sync
-       start_file_sync=$(mktemp -u)
+       local start_file_sync=$(mktemp --tmpdir -u "tmp.${FUNCNAME[0]}_sync_before_first.XXXXXX")
 
        lttng_untrack_all
 
@@ -61,7 +60,7 @@ function run_workload()
 
 function test_user_callstack()
 {
-       TRACE_PATH=$(mktemp -d)
+       TRACE_PATH=$(mktemp --tmpdir -d "tmp.${FUNCNAME[0]}_trace_path.XXXXXX")
        # This is the expected userspace callstack. (see gen-syscall-events-callstack.c)
        USER_CS_EXPECTED="main fct_a fct_b fct_c my_gettid"
        EVENT_NAME="gettid"
@@ -85,7 +84,7 @@ function test_user_callstack()
 
 function test_kernel_callstack()
 {
-       TRACE_PATH=$(mktemp -d)
+       TRACE_PATH=$(mktemp --tmpdir -d "tmp.${FUNCNAME[0]}_trace_path.XXXXXX")
        # Those are symbol expected to be present in the kernel callstack. This
        # is not an exhaustive list since it's kernel dependent.
 
This page took 0.023925 seconds and 4 git commands to generate.