Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf test: Fix test perf evlist for z/VM s390x

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@google.com>
Reviewed-by: Jan Polensky <japo@linux.ibm.com>
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Tested-by: Jan Polensky <japo@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Thomas Richter and committed by
Arnaldo Carvalho de Melo
008603bd dda5f926

+2 -2
+2 -2
tools/perf/tests/shell/evlist.sh
··· 21 21 22 22 test_evlist_simple() { 23 23 echo "Simple evlist test" 24 - if ! perf record -e cycles -o "${perfdata}" true 2> /dev/null 24 + if ! perf record -e cpu-clock -o "${perfdata}" true 2> /dev/null 25 25 then 26 26 echo "Simple evlist [Failed record]" 27 27 err=1 28 28 return 29 29 fi 30 - if ! perf evlist -i "${perfdata}" | grep -q "cycles" 30 + if ! perf evlist -i "${perfdata}" | grep -q "cpu-clock" 31 31 then 32 32 echo "Simple evlist [Failed to list event]" 33 33 err=1