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

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: db452961 ("perf tests evlist: Add basic evlist test")
Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
Tested-by: default avatarIan Rogers <irogers@google.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Jan Polensky <japo@linux.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 623ba6ea
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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