diff options
author | James Clark <james.clark@arm.com> | 2021-09-21 14:10:07 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-10-26 11:14:49 -0300 |
commit | cf95f85e27bb5001f1cd8fc2ee9d3ee13e580ab1 (patch) | |
tree | b52887e7b7e7932eee1248e3b55bad0582ca3db6 /tools | |
parent | 3a55445f11e6b1dbdc1e7f2684a519089d2e163c (diff) | |
download | linux-stable-cf95f85e27bb5001f1cd8fc2ee9d3ee13e580ab1.tar.gz linux-stable-cf95f85e27bb5001f1cd8fc2ee9d3ee13e580ab1.tar.bz2 linux-stable-cf95f85e27bb5001f1cd8fc2ee9d3ee13e580ab1.zip |
perf test: Fix record+script_probe_vfs_getname.sh /tmp cleanup
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>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20210921131009.390810-1-james.clark@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/perf/tests/shell/record+script_probe_vfs_getname.sh | 6 |
1 files 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} |