Skip to contentSkip to conversation

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

PATCH Applied Thomas Richter 3 participants 3 messages Jan 26

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 b04d2b919912 ("perf test: Fix test case perf evlist tests for s390x")
Cc Ian Rogers <[email protected]>
---
 tools/perf/tests/shell/evlist.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/perf/tests/shell/evlist.sh +2 -2
index 5632be391710..8a22f4171c07 100755
@@ -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
Signature · 1 line
2.52.0
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · Thomas Richter

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
      #
Quoted 5 lines
Fixes b04d2b919912 ("perf test: Fix test case perf evlist tests for s390x")
Cc Ian Rogers <[email protected]>

Thanks!
Ian

Quoted 27 lines
---
 tools/perf/tests/shell/evlist.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/perf/tests/shell/evlist.sh +2 -3
index 5632be391710..8a22f4171c07 100755
@@ -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.52.0

maintainer Applied
#2 lore raw
Quoted 18 lines · Ian Rogers
Quoted 17 lines · Thomas Richter

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
      #
Quoted 7 lines
Quoted 5 lines
Fixes b04d2b919912 ("perf test: Fix test case perf evlist tests for s390x")
Cc Ian Rogers <[email protected]>

Thanks, applied to perf-tools-next,

- Arnaldo