perf test: Fix test case perf evlist tests for s390x
authorThomas Richter <tmricht@linux.ibm.com>
Wed, 10 Dec 2025 07:17:52 +0000 (08:17 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 6 Jan 2026 21:41:02 +0000 (18:41 -0300)
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: db452961de939225 ("perf tests evlist: Add basic evlist test")
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Tested-by: Ian Rogers <irogers@google.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Jan Polensky <japo@linux.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/shell/evlist.sh

index 140f099..5632be3 100755 (executable)
@@ -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