Skip to contentSkip to conversation

perf test: Fix test case perf evlist tests for s390x

PATCH Applied Thomas Richter 3 participants 3 messages Dec 10, 2025 – Jan 6

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 perf test: Fix test case perf evlist tests for s390x

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")
---
 tools/perf/tests/shell/evlist.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
tools/perf/tests/shell/evlist.sh +3 -2
index 140f099e75c1..5632be391710 100755
@@ -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
Signature · 1 line
2.52.0
reviewer Tested-by on v2 1/1
#1 lore raw
Quoted 11 lines · 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!
  #
Quoted 7 lines

Output after:

  # ./perf test 78
  78: perf evlist tests              : Ok
  #
Fixes db452961de939 ("perf tests evlist: Add basic evlist test")

Thanks!

Ian

Quoted 28 lines
---
 tools/perf/tests/shell/evlist.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
tools/perf/tests/shell/evlist.sh +3 -3
index 140f099e75c1..5632be391710 100755
@@ -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

maintainer Applied
#2 lore raw
Quoted 17 lines · Ian Rogers
Quoted 16 lines · 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
  #
Quoted 4 lines
Quoted 2 lines
Fixes db452961de939 ("perf tests evlist: Add basic evlist test")

Thanks, applied to perf-tools-next,

- Arnaldo