summaryrefslogtreecommitdiff
path: root/tools/perf/tests/shell/test_arm_callgraph_fp.sh
diff options
context:
space:
mode:
authorJames Clark <james.clark@arm.com>2024-04-10 13:34:55 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2024-04-12 18:02:06 +0300
commit7aa87499797c8e805c93fb0fd457c6babfb44bdb (patch)
tree528987cdd247bf058ff9772ca2805880c8967977 /tools/perf/tests/shell/test_arm_callgraph_fp.sh
parentdf12e21d4e15e48a5e7d12e58f1a00742c4177d0 (diff)
downloadlinux-7aa87499797c8e805c93fb0fd457c6babfb44bdb.tar.xz
perf tests: Remove dependency on lscpu
This check can be done with uname which is more portable. At the same time re-arrange it into a standard if statement so that it's more readable. Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: James Clark <james.clark@arm.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Spoorthy S <spoorts2@in.ibm.com> Link: https://lore.kernel.org/r/20240410103458.813656-5-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/shell/test_arm_callgraph_fp.sh')
-rwxr-xr-xtools/perf/tests/shell/test_arm_callgraph_fp.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/tests/shell/test_arm_callgraph_fp.sh b/tools/perf/tests/shell/test_arm_callgraph_fp.sh
index 83b53591b1ea..61898e256616 100755
--- a/tools/perf/tests/shell/test_arm_callgraph_fp.sh
+++ b/tools/perf/tests/shell/test_arm_callgraph_fp.sh
@@ -6,7 +6,9 @@ shelldir=$(dirname "$0")
# shellcheck source=lib/perf_has_symbol.sh
. "${shelldir}"/lib/perf_has_symbol.sh
-lscpu | grep -q "aarch64" || exit 2
+if [ "$(uname -m)" != "aarch64" ]; then
+ exit 2
+fi
if perf version --build-options | grep HAVE_DWARF_UNWIND_SUPPORT | grep -q OFF
then