mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Clark <james.clark@linaro.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-perf-users@vger.kernel.org, Leo Yan <leo.yan@arm.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ian Rogers <irogers@google.com>,
	Kan Liang <kan.liang@linux.intel.com>
Subject: Re: [PATCH 2/3] perf test: Move some ARM tests to arch/arm64/tests/shell
Date: Fri, 23 May 2025 11:30:42 +0100	[thread overview]
Message-ID: <4bc8f1ae-5392-4b9a-a67a-391f3e93b22c@linaro.org> (raw)
In-Reply-To: <20250522171044.1075583-2-namhyung@kernel.org>



On 22/05/2025 6:10 pm, Namhyung Kim wrote:
> The test_arm_callgraph_fp.sh checks with aarch64 so it should belong to
> there.  And IIRC ARM SPE is supported on 64-bit platforms so move the
> tests too.  But I'm not sure about coresight so left them.

Coresight is also supported on arm32 which is why 
tools/perf/arch/arm/util/cs-etm.c is built for both platforms. Having 
said that, I'm not sure if the tests pass on arm32 because we're not 
running them, but they should pass and if someone is running them this 
change could break that.

We could symlink "arch/arm64/tests/shell" to "arch/arm/tests/shell" or 
have a condition in the code that forces one folder for both. Or just 
continue with only arm64. Considering I haven't seen a test failure 
report from there and we've only really been adding tests for arm64 
stuff it could be reasonable.

> 
> Also please test it with shellcheck as I couldn't run it actually.
> 

Shellcheck is working on these scripts for me.

Reviewed-by: James Clark <james.clark@linaro.org>

> Cc: Leo Yan <leo.yan@arm.com>
> Cc: James Clark <james.clark@linaro.org>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
>   tools/perf/arch/arm64/tests/Build                  | 14 ++++++++++++++
>   .../arm64}/tests/shell/test_arm_callgraph_fp.sh    |  4 ++--
>   .../{ => arch/arm64}/tests/shell/test_arm_spe.sh   |  0
>   .../arm64}/tests/shell/test_arm_spe_fork.sh        |  0
>   4 files changed, 16 insertions(+), 2 deletions(-)
>   rename tools/perf/{ => arch/arm64}/tests/shell/test_arm_callgraph_fp.sh (89%)
>   rename tools/perf/{ => arch/arm64}/tests/shell/test_arm_spe.sh (100%)
>   rename tools/perf/{ => arch/arm64}/tests/shell/test_arm_spe_fork.sh (100%)
> 
> diff --git a/tools/perf/arch/arm64/tests/Build b/tools/perf/arch/arm64/tests/Build
> index d44c9de92d425c62..6c73720cb0ffa99d 100644
> --- a/tools/perf/arch/arm64/tests/Build
> +++ b/tools/perf/arch/arm64/tests/Build
> @@ -3,3 +3,17 @@ perf-test-$(CONFIG_DWARF_UNWIND) += dwarf-unwind.o
>   
>   perf-test-y += arch-tests.o
>   perf-test-y += cpuid-match.o
> +
> +ifdef SHELLCHECK
> +  SHELL_TESTS := $(shell find shell -executable -type f -name '*.sh')
> +  SHELL_TEST_LOGS := $(SHELL_TESTS:tests/shell/%=shell/%.shellcheck_log)
> +else
> +  SHELL_TESTS :=
> +  SHELL_TEST_LOGS :=
> +endif
> +
> +$(OUTPUT)%.shellcheck_log: %
> +	$(call rule_mkdir)
> +	$(Q)$(call echo-cmd,test)shellcheck -a -S warning "$<" > $@ || (cat $@ && rm $@ && false)
> +
> +perf-test-y += $(SHELL_TEST_LOGS)
> diff --git a/tools/perf/tests/shell/test_arm_callgraph_fp.sh b/tools/perf/arch/arm64/tests/shell/test_arm_callgraph_fp.sh
> similarity index 89%
> rename from tools/perf/tests/shell/test_arm_callgraph_fp.sh
> rename to tools/perf/arch/arm64/tests/shell/test_arm_callgraph_fp.sh
> index 9caa36130175964e..f59ab293d67b9f9c 100755
> --- a/tools/perf/tests/shell/test_arm_callgraph_fp.sh
> +++ b/tools/perf/arch/arm64/tests/shell/test_arm_callgraph_fp.sh
> @@ -3,8 +3,8 @@
>   # SPDX-License-Identifier: GPL-2.0
>   
>   shelldir=$(dirname "$0")
> -# shellcheck source=lib/perf_has_symbol.sh
> -. "${shelldir}"/lib/perf_has_symbol.sh
> +# shellcheck source=../../../../tests/shell/lib/perf_has_symbol.sh
> +. "${shelldir}"/../../../../tests/shell/lib/perf_has_symbol.sh
>   
>   if [ "$(uname -m)" != "aarch64" ]; then
>   	exit 2
> diff --git a/tools/perf/tests/shell/test_arm_spe.sh b/tools/perf/arch/arm64/tests/shell/test_arm_spe.sh
> similarity index 100%
> rename from tools/perf/tests/shell/test_arm_spe.sh
> rename to tools/perf/arch/arm64/tests/shell/test_arm_spe.sh
> diff --git a/tools/perf/tests/shell/test_arm_spe_fork.sh b/tools/perf/arch/arm64/tests/shell/test_arm_spe_fork.sh
> similarity index 100%
> rename from tools/perf/tests/shell/test_arm_spe_fork.sh
> rename to tools/perf/arch/arm64/tests/shell/test_arm_spe_fork.sh


  reply	other threads:[~2025-05-23 10:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-22 17:10 [PATCH 1/3] perf test: Support arch-specific shell tests Namhyung Kim
2025-05-22 17:10 ` [PATCH 2/3] perf test: Move some ARM tests to arch/arm64/tests/shell Namhyung Kim
2025-05-23 10:30   ` James Clark [this message]
2025-05-22 17:10 ` [PATCH 3/3] perf test: Add AMD IBS sw filter test Namhyung Kim
2025-05-22 20:09 ` [PATCH 1/3] perf test: Support arch-specific shell tests Ian Rogers
2025-05-23 10:48   ` James Clark
2025-05-23 16:50     ` Arnaldo Carvalho de Melo
2025-05-23 21:36       ` Namhyung Kim
2025-05-23 17:54     ` Ian Rogers
2025-05-23 21:33       ` Namhyung Kim
2025-05-23 10:05 ` James Clark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4bc8f1ae-5392-4b9a-a67a-391f3e93b22c@linaro.org \
    --to=james.clark@linaro.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=leo.yan@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®