[PATCH 6.19 022/844] perf test: Fix test perf evlist for z/VM s390x
From: Sasha Levin
Date: Sat Feb 28 2026 - 12:37:35 EST
From: Thomas Richter <tmricht@xxxxxxxxxxxxx>
[ Upstream commit 008603bda19b29687edce533e4c09acff68c1077 ]
Perf test case 'perf evlist tests' fails on z/VM machines on s390.
The failure is causes by event cycles. This event is not available
on virtualized machines like z/VM on s390.
Change to software event cpu-clock to fix this.
Output before:
# ./perf test 78
79: perf evlist tests : FAILED!
#
Output after:
# ./perf test 78
79: perf evlist tests : Ok
#
Fixes: b04d2b9199129f4f ("perf test: Fix test case perf evlist tests for s390x")
Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>
Reviewed-by: Jan Polensky <japo@xxxxxxxxxxxxx>
Signed-off-by: Thomas Richter <tmricht@xxxxxxxxxxxxx>
Tested-by: Jan Polensky <japo@xxxxxxxxxxxxx>
Cc: Alexander Gordeev <agordeev@xxxxxxxxxxxxx>
Cc: Heiko Carstens <hca@xxxxxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Sumanth Korikkar <sumanthk@xxxxxxxxxxxxx>
Cc: Thomas Richter <tmricht@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 | 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 5632be3917109..8a22f4171c07c 100755
--- a/tools/perf/tests/shell/evlist.sh
+++ b/tools/perf/tests/shell/evlist.sh
@@ -21,13 +21,13 @@ trap trap_cleanup EXIT TERM INT
test_evlist_simple() {
echo "Simple evlist test"
- if ! perf record -e cycles -o "${perfdata}" true 2> /dev/null
+ if ! perf record -e cpu-clock -o "${perfdata}" true 2> /dev/null
then
echo "Simple evlist [Failed record]"
err=1
return
fi
- if ! perf evlist -i "${perfdata}" | grep -q "cycles"
+ if ! perf evlist -i "${perfdata}" | grep -q "cpu-clock"
then
echo "Simple evlist [Failed to list event]"
err=1
--
2.51.0