Cleanup: tests: name all temporary files to better identify leakage
[lttng-tools.git] / tests / regression / ust / namespaces / test_ns_contexts
index 062146970185d8baafab162bb067dffe84cd7106..be038eb28ecf734255fcf62ada37e56d57ec50fd 100755 (executable)
@@ -35,7 +35,6 @@ function test_ns()
        local session_name="${ns}_ns"
        local chan_name="${ns}_ns"
        local context_name="${ns}_ns"
-
        local trace_path
        local ns_inode
 
@@ -45,12 +44,12 @@ function test_ns()
                return
        fi
 
+       trace_path=$(mktemp --tmpdir -d -t "tmp.${FUNCNAME[0]}_trace_path.XXXXXX")
+
        # Get the current ns inode number
        ns_inode=$(stat -c '%i' -L "/proc/$$/ns/$ns")
        ok $? "Get current $ns namespace inode: $ns_inode"
 
-       trace_path=$(mktemp -d)
-
        start_lttng_sessiond
 
        create_lttng_session_ok "$session_name" "$trace_path"
This page took 0.022914 seconds and 4 git commands to generate.