The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v1] perf test: Skip diff test if test_loop is missing
@ 2023-12-05 16:49 Ian Rogers
  2023-12-05 19:22 ` Adrian Hunter
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Rogers @ 2023-12-05 16:49 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Ian Rogers, Adrian Hunter, linux-perf-users, linux-kernel

The diff test depends on finding the symbol test_loop in perf and will
fail if perf has been stripped and no debug object is available. In
that case, skip the test instead.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/tests/shell/diff.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tools/perf/tests/shell/diff.sh b/tools/perf/tests/shell/diff.sh
index 213185763688..14b87af88703 100755
--- a/tools/perf/tests/shell/diff.sh
+++ b/tools/perf/tests/shell/diff.sh
@@ -9,8 +9,15 @@ perfdata1=$(mktemp /tmp/__perf_test.perf.data.XXXXX)
 perfdata2=$(mktemp /tmp/__perf_test.perf.data.XXXXX)
 perfdata3=$(mktemp /tmp/__perf_test.perf.data.XXXXX)
 testprog="perf test -w thloop"
+
+shelldir=$(dirname "$0")
+# shellcheck source=lib/perf_has_symbol.sh
+. "${shelldir}"/lib/perf_has_symbol.sh
+
 testsym="test_loop"
 
+skip_test_missing_symbol ${testsym}
+
 cleanup() {
   rm -rf "${perfdata1}"
   rm -rf "${perfdata1}".old
-- 
2.43.0.rc2.451.g8631bc7472-goog


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

end of thread, other threads:[~2023-12-05 19:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-05 16:49 [PATCH v1] perf test: Skip diff test if test_loop is missing Ian Rogers
2023-12-05 19:22 ` Adrian Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox