Re: [PATCH] perf test: Fix test case 81 on s390x

From: German Gomez
Date: Thu Apr 28 2022 - 09:43:47 EST



On 28/04/2022 13:28, Thomas Richter wrote:
> perf test -F 81 -v fails on s390x on the linux-next branch.
> The test case is x86 specific can not be executed on s390x.
> The test case depends on x86 register names such as
>
> ... | egrep -q 'available registers: AX BX CX DX ....'
>
> Skip this test case on s390x.
>
> Output before:
> # perf test -F 81
> 81: perf record tests : FAILED!
> #
>
> Output after:
> # perf test -F 81
> 81: perf record tests : Skip
> #
>
> Fixes: 24f378e66021 ("perf test: Add basic perf record tests")
> Cc: Ian Rogers <irogers@xxxxxxxxxx>
> Signed-off-by: Thomas Richter <tmricht@xxxxxxxxxxxxx>
> ---
> tools/perf/tests/shell/record.sh | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/perf/tests/shell/record.sh b/tools/perf/tests/shell/record.sh
> index cd1cf14259b8..d98f4d4a00e1 100755
> --- a/tools/perf/tests/shell/record.sh
> +++ b/tools/perf/tests/shell/record.sh
> @@ -37,6 +37,8 @@ test_register_capture() {
> echo "Register capture test [Success]"
> }
>
> +# Test for platform support and return TEST_SKIP
> +[ $(uname -m) = s390x ] && exit 2
> test_per_thread

The "test_per_thread" might still be valid though, right?

In my case, the register test skips gracefully (arm64).

$ ./perf test 82 -v
 82: perf record tests                                               :
--- start ---
test child forked, pid 54345
Basic --per-thread mode test
Basic --per-thread mode test [Success]
Register capture test
Register capture test [Skipped missing instruction]
test child finished with 0
---- end ----
perf record tests: Ok

> test_register_capture
> exit $err