[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240410103458.813656-5-james.clark@arm.com>
Date: Wed, 10 Apr 2024 11:34:55 +0100
From: James Clark <james.clark@....com>
To: linux-perf-users@...r.kernel.org,
irogers@...gle.com,
namhyung@...nel.org
Cc: James Clark <james.clark@....com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>,
"Liang, Kan" <kan.liang@...ux.intel.com>,
Athira Rajeev <atrajeev@...ux.vnet.ibm.com>,
Spoorthy S <spoorts2@...ibm.com>,
Leo Yan <leo.yan@...ux.dev>,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 4/4] 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.
Signed-off-by: James Clark <james.clark@....com>
---
tools/perf/tests/shell/test_arm_callgraph_fp.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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
--
2.34.1
Powered by blists - more mailing lists