Skip to contentSkip to conversation

perf test: Skip perf data type profiling tests for s390

PATCH Applied Thomas Richter 3 participants 3 messages Apr 1 – Apr 2

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 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
Fixes f60a5c22967b8 ("perf tests: Test annotate with data type profiling and rust")
Cc Namhyung Kim <[email protected]>
Cc Dmitrii Dolgov <[email protected]>
---
 tools/perf/tests/shell/data_type_profiling.sh | 4 ++++
 1 file changed, 4 insertions(+)
tools/perf/tests/shell/data_type_profiling.sh +4 -0
index fb47b7213b33..eca694600a04 100755
@@ -15,6 +15,10 @@ err=0
 perfdata=$(mktemp /tmp/__perf_test.perf.data.XXXXX)
 perfout=$(mktemp /tmp/__perf_test.perf.out.XXXXX)
 
+# Check for support of perf mem before trap handler
+perf mem record -o /dev/null -- true  2>&1 | \
+  		grep -q "failed: no PMU supports the memory events" && exit 2
+
 cleanup() {
   rm -rf "${perfdata}" "${perfout}"
   rm -rf "${perfdata}".old
Signature · 1 line
2.53.0
reviewer Reviewed-by on v3 1/1
#1 lore raw
Quoted 23 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
Quoted 6 lines
Fixes f60a5c22967b8 ("perf tests: Test annotate with data type profiling and rust")
Cc Namhyung Kim <[email protected]>
Cc Dmitrii Dolgov <[email protected]>

Thanks!
Ian

Quoted 22 lines
---
 tools/perf/tests/shell/data_type_profiling.sh | 4 ++++
 1 file changed, 4 insertions(+)
tools/perf/tests/shell/data_type_profiling.sh +4 -1
index fb47b7213b33..eca694600a04 100755
@@ -15,6 +15,10 @@ err=0
 perfdata=$(mktemp /tmp/__perf_test.perf.data.XXXXX)
 perfout=$(mktemp /tmp/__perf_test.perf.out.XXXXX)
 
+# Check for support of perf mem before trap handler
+perf mem record -o /dev/null -- true  2>&1 | \
+               grep -q "failed: no PMU supports the memory events" && exit 2
+
 cleanup() {
   rm -rf "${perfdata}" "${perfout}"
   rm -rf "${perfdata}".old
--

2.53.0

maintainer Applied
#2 lore raw
In reply to Thomas Richter
Quoted 10 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
  #

[...]

Applied to perf-tools-next, thanks!

Best regards,
Namhyung