All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] perf test: perf stat tests fails on s390
@ 2026-09-03  7:35 Thomas Richter
  2026-09-03  7:38 ` sashiko-bot
  2026-09-03 18:17 ` Ian Rogers
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Richter @ 2026-09-03  7:35 UTC (permalink / raw)
  To: linux-kernel, linux-s390, linux-perf-users, acme, namhyung,
	irogers
  Cc: agordeev, iii, sumanthk, hca, japo, Thomas Richter, Aaron Tomlin

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: 64724095a33f ("perf stat: Add --hide-zero-events option to suppress zero-count events")
Cc: Aaron Tomlin <atomlin@atomlin.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Aaron Tomlin <atomlin@atomlin.com>
---
 tools/perf/tests/shell/stat.sh | 5 +++++
 1 file changed, 5 insertions(+)

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
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] perf test: perf stat tests fails on s390
  2026-09-03  7:35 [PATCH v2] perf test: perf stat tests fails on s390 Thomas Richter
@ 2026-09-03  7:38 ` sashiko-bot
  2026-09-03 18:17 ` Ian Rogers
  1 sibling, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-09-03  7:38 UTC (permalink / raw)
  To: Thomas Richter
  Cc: Heiko Carstens, linux-perf-users, linux-s390, Vasily Gorbik,
	Alexander Gordeev, Christian Borntraeger

> 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
> [ ... ]
> Fixes: 64724095a33f ("perf stat: Add --hide-zero-events option to suppress zero-count events")
> Cc: Aaron Tomlin <atomlin@atomlin.com>
> Cc: Ian Rogers <irogers@google.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260903073554.1300334-1-tmricht@linux.ibm.com?part=1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] perf test: perf stat tests fails on s390
  2026-09-03  7:35 [PATCH v2] perf test: perf stat tests fails on s390 Thomas Richter
  2026-09-03  7:38 ` sashiko-bot
@ 2026-09-03 18:17 ` Ian Rogers
  2026-09-08 20:55   ` Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 4+ messages in thread
From: Ian Rogers @ 2026-09-03 18:17 UTC (permalink / raw)
  To: Thomas Richter
  Cc: linux-kernel, linux-s390, linux-perf-users, acme, namhyung,
	agordeev, iii, sumanthk, hca, japo, Aaron Tomlin

On Thu, Sep 3, 2026 at 12:36 AM Thomas Richter <tmricht@linux.ibm.com> wrote:
>
> 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: 64724095a33f ("perf stat: Add --hide-zero-events option to suppress zero-count events")
> Cc: Aaron Tomlin <atomlin@atomlin.com>
> Cc: Ian Rogers <irogers@google.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> Reviewed-by: Aaron Tomlin <atomlin@atomlin.com>

Reviewed-by: Ian Rogers <irogers@google.com>

Thanks,
Ian

> ---
>  tools/perf/tests/shell/stat.sh | 5 +++++
>  1 file changed, 5 insertions(+)
>
> 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
> --
> 2.55.0
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] perf test: perf stat tests fails on s390
  2026-09-03 18:17 ` Ian Rogers
@ 2026-09-08 20:55   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2026-09-08 20:55 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Thomas Richter, linux-kernel, linux-s390, linux-perf-users,
	namhyung, agordeev, iii, sumanthk, hca, japo, Aaron Tomlin

On Thu, Sep 03, 2026 at 11:17:01AM -0700, Ian Rogers wrote:
> On Thu, Sep 3, 2026 at 12:36 AM Thomas Richter <tmricht@linux.ibm.com> wrote:
> >
> > 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: 64724095a33f ("perf stat: Add --hide-zero-events option to suppress zero-count events")
> > Cc: Aaron Tomlin <atomlin@atomlin.com>
> > Cc: Ian Rogers <irogers@google.com>
> > Cc: Namhyung Kim <namhyung@kernel.org>
> > Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> > Reviewed-by: Aaron Tomlin <atomlin@atomlin.com>
> 
> Reviewed-by: Ian Rogers <irogers@google.com>

Thanks, applied to perf-tools-next, for v7.4.

- Arnaldo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-08 20:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03  7:35 [PATCH v2] perf test: perf stat tests fails on s390 Thomas Richter
2026-09-03  7:38 ` sashiko-bot
2026-09-03 18:17 ` Ian Rogers
2026-09-08 20:55   ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.