Cleanup: tests: name all temporary files to better identify leakage
[lttng-tools.git] / tests / regression / tools / regen-statedump / test_ust
index b722315ac4cdfc65545b627a76ae95242673ac5c..8572e254546b9cedc40d8ec039ec6a7c93d8d38a 100755 (executable)
@@ -1,19 +1,9 @@
 #!/bin/bash
 #
-# Copyright (C) 2016 Julien Desfossez <jdesfossez@efficios.com>
+# Copyright (C) 2016 Julien Desfossez <jdesfossez@efficios.com>
 #
-# This library is free software; you can redistribute it and/or modify it under
-# the terms of the GNU Lesser General Public License as published by the Free
-# Software Foundation; version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
-# details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+# SPDX-License-Identifier: LGPL-2.1-only
+
 TEST_DESC="Regenerate the statedump - User-space tracing"
 
 CURDIR=$(dirname $0)/
@@ -26,7 +16,7 @@ TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME"
 SESSION_NAME="stream"
 EVENT_NAME="lttng_ust_statedump:start,lttng_ust_statedump:end"
 
-TRACE_PATH=$(mktemp -d)
+TRACE_PATH=$(mktemp --tmpdir -d tmp.test_regenerate_statedump_ust_trace_path.XXXXXX)
 
 NUM_TESTS=11
 
@@ -38,8 +28,8 @@ fi
 
 function test_ust_local ()
 {
-       local file_sync_after_first=$(mktemp -u)
-       local file_sync_before_last=$(mktemp -u)
+       local file_sync_after_first=$(mktemp --tmpdir -u tmp.test_${FUNCNAME[0]}_sync_after_first.XXXXXX)
+       local file_sync_before_last=$(mktemp --tmpdir -u tmp.test_${FUNCNAME[0]}_sync_before_last.XXXXXX)
 
        diag "Test UST local with statedump regeneration"
        create_lttng_session_ok $SESSION_NAME $TRACE_PATH
This page took 0.027966 seconds and 4 git commands to generate.