Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf test shell diff: Skip test if test_loop symbol is missing in the perf binary

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.

Suggested-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20231205164924.835682-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Ian Rogers and committed by
Arnaldo Carvalho de Melo
407a3898 d0acce68

+7
+7
tools/perf/tests/shell/diff.sh
··· 9 9 perfdata2=$(mktemp /tmp/__perf_test.perf.data.XXXXX) 10 10 perfdata3=$(mktemp /tmp/__perf_test.perf.data.XXXXX) 11 11 testprog="perf test -w thloop" 12 + 13 + shelldir=$(dirname "$0") 14 + # shellcheck source=lib/perf_has_symbol.sh 15 + . "${shelldir}"/lib/perf_has_symbol.sh 16 + 12 17 testsym="test_loop" 18 + 19 + skip_test_missing_symbol ${testsym} 13 20 14 21 cleanup() { 15 22 rm -rf "${perfdata1}"