linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] perf test: Fix test case perf evlist tests for s390x
@ 2025-12-10  7:17 Thomas Richter
  2025-12-10 18:35 ` Ian Rogers
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Richter @ 2025-12-10  7:17 UTC (permalink / raw)
  To: linux-kernel, linux-s390, linux-perf-users, acme, namhyung,
	irogers
  Cc: agordeev, gor, sumanthk, hca, japo, Thomas Richter

Perf test case 78: perf evlist tests fails on s390. The failure
is causes by grouping events cycles and instructions because
sampling does only support event cycles.
Change the group to software events to fix this.

Output before:
  # ./perf test 78
  78: perf evlist tests              : FAILED!
  #

Output after:
  # ./perf test 78
  78: perf evlist tests              : Ok
  #

Fixes: db452961de939 ("perf tests evlist: Add basic evlist test")
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
---
 tools/perf/tests/shell/evlist.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/perf/tests/shell/evlist.sh b/tools/perf/tests/shell/evlist.sh
index 140f099e75c1..5632be391710 100755
--- a/tools/perf/tests/shell/evlist.sh
+++ b/tools/perf/tests/shell/evlist.sh
@@ -38,13 +38,14 @@ test_evlist_simple() {
 
 test_evlist_group() {
 	echo "Group evlist test"
-	if ! perf record -e "{cycles,instructions}" -o "${perfdata}" true 2> /dev/null
+	if ! perf record -e "{cpu-clock,task-clock}" -o "${perfdata}" \
+		-- perf test -w noploop 2> /dev/null
 	then
 		echo "Group evlist [Skipped event group recording failed]"
 		return
 	fi
 
-	if ! perf evlist -i "${perfdata}" -g | grep -q "{.*cycles.*,.*instructions.*}"
+	if ! perf evlist -i "${perfdata}" -g | grep -q "{.*cpu-clock.*,.*task-clock.*}"
 	then
 		echo "Group evlist [Failed to list event group]"
 		err=1
-- 
2.52.0


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

* Re: [PATCH v2] perf test: Fix test case perf evlist tests for s390x
  2025-12-10  7:17 [PATCH v2] perf test: Fix test case perf evlist tests for s390x Thomas Richter
@ 2025-12-10 18:35 ` Ian Rogers
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Rogers @ 2025-12-10 18:35 UTC (permalink / raw)
  To: Thomas Richter
  Cc: linux-kernel, linux-s390, linux-perf-users, acme, namhyung,
	agordeev, gor, sumanthk, hca, japo

On Tue, Dec 9, 2025 at 11:18 PM Thomas Richter <tmricht@linux.ibm.com> wrote:
>
> Perf test case 78: perf evlist tests fails on s390. The failure
> is causes by grouping events cycles and instructions because
> sampling does only support event cycles.
> Change the group to software events to fix this.
>
> Output before:
>   # ./perf test 78
>   78: perf evlist tests              : FAILED!
>   #
>
> Output after:
>   # ./perf test 78
>   78: perf evlist tests              : Ok
>   #
>
> Fixes: db452961de939 ("perf tests evlist: Add basic evlist test")
> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>

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

Thanks!

Ian

> ---
>  tools/perf/tests/shell/evlist.sh | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/tests/shell/evlist.sh b/tools/perf/tests/shell/evlist.sh
> index 140f099e75c1..5632be391710 100755
> --- a/tools/perf/tests/shell/evlist.sh
> +++ b/tools/perf/tests/shell/evlist.sh
> @@ -38,13 +38,14 @@ test_evlist_simple() {
>
>  test_evlist_group() {
>         echo "Group evlist test"
> -       if ! perf record -e "{cycles,instructions}" -o "${perfdata}" true 2> /dev/null
> +       if ! perf record -e "{cpu-clock,task-clock}" -o "${perfdata}" \
> +               -- perf test -w noploop 2> /dev/null
>         then
>                 echo "Group evlist [Skipped event group recording failed]"
>                 return
>         fi
>
> -       if ! perf evlist -i "${perfdata}" -g | grep -q "{.*cycles.*,.*instructions.*}"
> +       if ! perf evlist -i "${perfdata}" -g | grep -q "{.*cpu-clock.*,.*task-clock.*}"
>         then
>                 echo "Group evlist [Failed to list event group]"
>                 err=1
> --
> 2.52.0
>

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

end of thread, other threads:[~2025-12-10 18:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-10  7:17 [PATCH v2] perf test: Fix test case perf evlist tests for s390x Thomas Richter
2025-12-10 18:35 ` Ian Rogers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).