Cleanup: tests: name all temporary files to better identify leakage
[lttng-tools.git] / tests / regression / ust / java-log4j / test_java_log4j
index 8b045025b0f1d0f8e463116e36bfed899c98bd99..fc16e02d05c9304354090f801088cbb2ea41bcf1 100755 (executable)
@@ -80,8 +80,8 @@ function enable_log4j_filter_loglevel_only()
 
 function test_log4j_before_start ()
 {
-       local file_sync_after_first=$(mktemp -u)
-       local file_sync_before_last=$(mktemp -u)
+       local file_sync_after_first=$(mktemp --tmpdir -u "tmp.${FUNCNAME[0]}_sync_after_first.XXXXXX")
+       local file_sync_before_last=$(mktemp --tmpdir -u "tmp.${FUNCNAME[0]}_sync_before_last.XXXXXX")
 
        diag "Test LOG4J application BEFORE tracing starts"
        create_lttng_session_ok $SESSION_NAME $TRACE_PATH
@@ -693,7 +693,7 @@ skip $withapp "LOG4J support is needed. Skipping all tests." $NUM_TESTS ||
 
        for fct_test in ${tests[@]};
        do
-               TRACE_PATH=$(mktemp -d)
+               TRACE_PATH=$(mktemp --tmpdir -d tmp.test_java_log4j_trace_path.XXXXXX)
 
                ${fct_test}
                if [ $? -ne 0 ]; then
This page took 0.023317 seconds and 4 git commands to generate.