[PATCH] perf test: Fix test case perf evlist tests for s390x

Thomas Richter posted 1 patch 1 week, 2 days ago
There is a newer version of this series
tools/perf/tests/shell/evlist.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] perf test: Fix test case perf evlist tests for s390x
Posted by Thomas Richter 1 week, 2 days ago
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 -e '{cycles,cycles}' 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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/tests/shell/evlist.sh b/tools/perf/tests/shell/evlist.sh
index 140f099e75c1..80f808b3059d 100755
--- a/tools/perf/tests/shell/evlist.sh
+++ b/tools/perf/tests/shell/evlist.sh
@@ -38,13 +38,13 @@ 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 "{cycles,cycles}" -o "${perfdata}" true 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 "{.*cycles.*,.*cycles.*}"
 	then
 		echo "Group evlist [Failed to list event group]"
 		err=1
-- 
2.52.0
Re: [PATCH] perf test: Fix test case perf evlist tests for s390x
Posted by Ian Rogers 1 week, 2 days ago
On Tue, Dec 9, 2025 at 2:50 AM 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 -e '{cycles,cycles}' 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>

Thanks Thomas, I always appreciate your help and fixes! Do you think
we should switch to software events to remedy this issue? Perhaps
cpu-clock and task-clock? I worry about event deduplication possibly
causing issues were it to happen.

Thanks,
Ian

> ---
>  tools/perf/tests/shell/evlist.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/tests/shell/evlist.sh b/tools/perf/tests/shell/evlist.sh
> index 140f099e75c1..80f808b3059d 100755
> --- a/tools/perf/tests/shell/evlist.sh
> +++ b/tools/perf/tests/shell/evlist.sh
> @@ -38,13 +38,13 @@ 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 "{cycles,cycles}" -o "${perfdata}" true 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 "{.*cycles.*,.*cycles.*}"
>         then
>                 echo "Group evlist [Failed to list event group]"
>                 err=1
> --
> 2.52.0
>