Commit 008603bd authored by Thomas Richter's avatar Thomas Richter Committed by Arnaldo Carvalho de Melo
Browse files

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: b04d2b91 ("perf test: Fix test case perf evlist tests for s390x")
Reviewed-by: default avatarIan Rogers <irogers@google.com>
Reviewed-by: default avatarJan Polensky <japo@linux.ibm.com>
Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
Tested-by: default avatarJan 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent dda5f926
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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