summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Richter <tmricht@linux.ibm.com>2026-09-03 09:35:53 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-09-08 17:54:53 -0300
commit454e049a3f6528a04f96afb4cbef1fcbb49c2d0f (patch)
tree2b8253b2999e669d95e9ae7f3c0dcd87e834ae3f
parent79e07ac60869cc95895c5f74424fe5cf32c5dac3 (diff)
downloadlinux-next-454e049a3f6528a04f96afb4cbef1fcbb49c2d0f.tar.gz
linux-next-454e049a3f6528a04f96afb4cbef1fcbb49c2d0f.zip
perf test: perf stat tests fails on s390
The test case 'perf stat tests' fails on s390 z/VM machines. The root cause is the unsupported CPU measurement facility on z/VM. Therefore the events cycles and instructions do not exist and are unsupported. This cause the subtest Hide zero events stat test to fail. Output before: # perf test 116 116: perf stat tests : FAILED! === Test Summary === Passed main tests : 0 Passed subtests : 0 Skipped tests : 0 Failed tests : 1 List of failed tests: 116: perf stat tests # Output after: # ./perf test 116 116: perf stat tests : Ok === Test Summary === Passed main tests : 1 Passed subtests : 0 Skipped tests : 0 Failed tests : 0 # Fixes: 64724095a33fbee8 ("perf stat: Add --hide-zero-events option to suppress zero-count events") Reviewed-by: Aaron Tomlin <atomlin@atomlin.com> Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com> Cc: Aaron Tomlin <atomlin@atomlin.com> Cc: Ian Rogers <irogers@google.com> Cc: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rwxr-xr-xtools/perf/tests/shell/stat.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/tests/shell/stat.sh b/tools/perf/tests/shell/stat.sh
index 298ce454b45a..1f5d4cc05807 100755
--- a/tools/perf/tests/shell/stat.sh
+++ b/tools/perf/tests/shell/stat.sh
@@ -583,6 +583,11 @@ test_hide_zero_events_stat() {
# Check that --metric-only works with --hide-zero-events
if ! perf stat --hide-zero-events --metric-only -e instructions,cycles true > "${stat_output}" 2>&1
then
+ if grep -sq 'No supported events found' "${stat_output}"
+ then
+ echo "Hide zero events stat test [Skipped - events not supported]"
+ return
+ fi
echo "Hide zero events stat test [Failed - metric-only command failed]"
err=1
return