[PATCH 6.19 004/844] perf test: Fix test case perf evlist tests for s390x

From: Sasha Levin

Date: Sat Feb 28 2026 - 12:33:34 EST


From: Thomas Richter <tmricht@xxxxxxxxxxxxx>

[ Upstream commit b04d2b9199129f4f0c992a518c0fb78c2efc1064 ]

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@xxxxxxxxxxxxx>
Tested-by: Ian Rogers <irogers@xxxxxxxxxx>
Cc: Alexander Gordeev <agordeev@xxxxxxxxxxxxx>
Cc: Heiko Carstens <hca@xxxxxxxxxxxxx>
Cc: Jan Polensky <japo@xxxxxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Sumanth Korikkar <sumanthk@xxxxxxxxxxxxx>
Cc: Vasily Gorbik <gor@xxxxxxxxxxxxx>
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
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 140f099e75c1e..5632be3917109 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.51.0