perf test: Skip perf data type profiling tests for s390
Subsystems (2)
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
@@ -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
Namhyung Kim
maintainerQuoted 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 : SkipSigned-off-by Thomas Richter <[email protected]>Cc Namhyung Kim <[email protected]>Cc Dmitrii Dolgov <[email protected]>Acked-by Sumanth Korikkar <[email protected]>Tested-by Jan Polensky <[email protected]>--- tools/perf/tests/shell/data_type_profiling.sh | 6 ++++++ 1 file changed, 6 insertions(+)tools/perf/tests/shell/data_type_profiling.sh +0
-0
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
-0case "x${runtime}" in "xRust") if ! perf check feature -q rustSignature · 1 line
2.53.0