[PATCH] perf test: Skip perf data type profiling tests for s390

Thomas Richter posted 1 patch 6 days, 1 hour ago
There is a newer version of this series
tools/perf/tests/shell/data_type_profiling.sh | 6 ++++++
1 file changed, 6 insertions(+)
[PATCH] perf test: Skip perf data type profiling tests for s390
Posted by Thomas Richter 6 days, 1 hour ago
Test case 'perf data type profiling tests' fails on s390 with this
error:

  # ./perf mem record -- ./perf test -w code_with_type
  failed: no PMU supports the memory events
  # echo $?
  255
  #

because s390 does not support memory events at all. According to the
man page, perf annotate --code-with-type only works with memory
instructions only.  As command 'perf mem record ...' is not supported
on s390, skip this test for s390.

Output before:
 # ./perf test 'perf data type profiling tests'
 77: perf data type profiling tests                        : FAILED!

Output after:
 # ./perf test 'perf data type profiling tests'
 77: perf data type profiling tests                        : Skip

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Dmitrii Dolgov <9erthalion6@gmail.com>
Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Tested-by: Jan Polensky <japo@linux.ibm.com>
---
 tools/perf/tests/shell/data_type_profiling.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/perf/tests/shell/data_type_profiling.sh b/tools/perf/tests/shell/data_type_profiling.sh
index 2a7f8f7c42d0..d9393be6249e 100755
--- a/tools/perf/tests/shell/data_type_profiling.sh
+++ b/tools/perf/tests/shell/data_type_profiling.sh
@@ -35,6 +35,12 @@ test_basic_annotate() {
 
   echo "${mode} ${runtime} perf annotate test"
 
+  case "$(uname -m)" in
+    "s390x")
+      echo "Skip: 'perf mem record' not supported"
+      err=2
+      return ;;
+  esac
   case "x${runtime}" in
     "xRust")
     if ! perf check feature -q rust
-- 
2.53.0
Re: [PATCH] perf test: Skip perf data type profiling tests for s390
Posted by Namhyung Kim 2 days, 7 hours ago
On Fri, Mar 27, 2026 at 01:35:41PM +0100, Thomas Richter wrote:
> Test case 'perf data type profiling tests' fails on s390 with this
> error:
> 
>   # ./perf mem record -- ./perf test -w code_with_type
>   failed: no PMU supports the memory events
>   # echo $?
>   255
>   #
> 
> because s390 does not support memory events at all. According to the
> man page, perf annotate --code-with-type only works with memory
> instructions only.  As command 'perf mem record ...' is not supported
> on s390, skip this test for s390.
> 
> Output before:
>  # ./perf test 'perf data type profiling tests'
>  77: perf data type profiling tests                        : FAILED!
> 
> Output after:
>  # ./perf test 'perf data type profiling tests'
>  77: perf data type profiling tests                        : Skip
> 
> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Dmitrii Dolgov <9erthalion6@gmail.com>
> Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
> Tested-by: Jan Polensky <japo@linux.ibm.com>
> ---
>  tools/perf/tests/shell/data_type_profiling.sh | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/tools/perf/tests/shell/data_type_profiling.sh b/tools/perf/tests/shell/data_type_profiling.sh
> index 2a7f8f7c42d0..d9393be6249e 100755
> --- a/tools/perf/tests/shell/data_type_profiling.sh
> +++ b/tools/perf/tests/shell/data_type_profiling.sh
> @@ -35,6 +35,12 @@ test_basic_annotate() {
>  
>    echo "${mode} ${runtime} perf annotate test"
>  
> +  case "$(uname -m)" in
> +    "s390x")
> +      echo "Skip: 'perf mem record' not supported"
> +      err=2
> +      return ;;
> +  esac

Then I think it should be general like checking the error code after
running `perf mem record` first instead of looking at machine types.

Thanks,
Namhyung


>    case "x${runtime}" in
>      "xRust")
>      if ! perf check feature -q rust
> -- 
> 2.53.0
>