All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] perf tests: Fix record+script_probe_vfs_getname.sh /tmp cleanup
@ 2021-09-21 13:10 James Clark
  2021-09-21 13:10 ` [PATCH 2/3] perf tests: Fix trace+probe_vfs_getname.sh " James Clark
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: James Clark @ 2021-09-21 13:10 UTC (permalink / raw)
  To: acme, leo.yan, linux-perf-users
  Cc: James Clark, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Namhyung Kim, linux-kernel

The temp files are only cleaned up if the test is not skipped, so delay
making them until after the skip so they don't get left behind in /tmp.

Signed-off-by: James Clark <james.clark@arm.com>
---
 tools/perf/tests/shell/record+script_probe_vfs_getname.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/tests/shell/record+script_probe_vfs_getname.sh b/tools/perf/tests/shell/record+script_probe_vfs_getname.sh
index bf9e729b3ecf..8d9c04e450ae 100755
--- a/tools/perf/tests/shell/record+script_probe_vfs_getname.sh
+++ b/tools/perf/tests/shell/record+script_probe_vfs_getname.sh
@@ -15,9 +15,6 @@ skip_if_no_perf_probe || exit 2
 
 . $(dirname $0)/lib/probe_vfs_getname.sh
 
-perfdata=$(mktemp /tmp/__perf_test.perf.data.XXXXX)
-file=$(mktemp /tmp/temporary_file.XXXXX)
-
 record_open_file() {
 	echo "Recording open file:"
 	perf record -o ${perfdata} -e probe:vfs_getname\* touch $file
@@ -35,6 +32,9 @@ if [ $err -ne 0 ] ; then
 	exit $err
 fi
 
+perfdata=$(mktemp /tmp/__perf_test.perf.data.XXXXX)
+file=$(mktemp /tmp/temporary_file.XXXXX)
+
 record_open_file && perf_script_filenames
 err=$?
 rm -f ${perfdata}
-- 
2.28.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-10-26 14:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-21 13:10 [PATCH 1/3] perf tests: Fix record+script_probe_vfs_getname.sh /tmp cleanup James Clark
2021-09-21 13:10 ` [PATCH 2/3] perf tests: Fix trace+probe_vfs_getname.sh " James Clark
2021-09-21 13:10 ` [PATCH 3/3] perf tests: Improve temp file cleanup in test_arm_coresight.sh James Clark
2021-09-22  6:10   ` Ian Rogers
2021-09-22 11:00   ` Leo Yan
2021-09-22 13:40     ` James Clark
2021-09-22 14:08       ` Leo Yan
2021-09-22 16:49         ` James Clark
2021-09-23  1:18           ` Leo Yan
     [not found] ` <CAP-5=fU_CSPv2Kry6ObbfYG4rNJpprhBrFUOJsNugM-AqQ3xoA@mail.gmail.com>
2021-10-26 14:18   ` [PATCH 1/3] perf tests: Fix record+script_probe_vfs_getname.sh /tmp cleanup Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.