Skip to contentSkip to conversation

perf test: Skip perf data type profiling tests for s390

PATCH Superseded Thomas Richter 2 participants 2 messages Mar 27 – Mar 31

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf test: Skip perf data type profiling tests for s390

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
---
 tools/perf/tests/shell/data_type_profiling.sh | 6 ++++++
 1 file changed, 6 insertions(+)
tools/perf/tests/shell/data_type_profiling.sh +6 -0
index 2a7f8f7c42d0..d9393be6249e 100755
@@ -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
Signature · 1 line
2.53.0
maintainer
#1 lore raw
Quoted 36 lines · Thomas Richter

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
---
 tools/perf/tests/shell/data_type_profiling.sh | 6 ++++++
 1 file changed, 6 insertions(+)
tools/perf/tests/shell/data_type_profiling.sh +0 -0
index 2a7f8f7c42d0..d9393be6249e 100755

tools/perf/tests/shell/data_type_profiling.sh test_basic_annotate() { · line 43

Quoted 9 lines
tools/perf/tests/shell/data_type_profiling.sh +6 -0
@@ -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

Quoted 6 lines
tools/perf/tests/shell/data_type_profiling.sh +0 -0
   case "x${runtime}" in
     "xRust")
     if ! perf check feature -q rust
Signature · 1 line
2.53.0