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 hybrid testing of event fallback test

The mem-loads-aux event exists on hybrid systems but the "cpu" PMU
does not. This causes an event parsing error which erroneously makes
the test look like it is failing. Avoid naming the PMU to avoid
this. Rather than cleaning up perf.data in the directory the test is
run, explicitly send the 'perf record' output to /dev/null and avoid
any cleanup scripts.

Fixes: fc9c17b22352 ("perf test: Add a perf event fallback test")
Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

authored by

Ian Rogers and committed by
Namhyung Kim
44f6b440 441863ae

+2 -17
+2 -17
tools/perf/tests/shell/test_event_open_fallback.sh
··· 6 6 ok_cnt=0 7 7 err_cnt=0 8 8 9 - cleanup() 10 - { 11 - rm -f perf.data 12 - rm -f perf.data.old 13 - trap - EXIT TERM INT 14 - } 15 - 16 - trap_cleanup() 17 - { 18 - cleanup 19 - exit 1 20 - } 21 - 22 - trap trap_cleanup EXIT TERM INT 23 - 24 9 perf_record() 25 10 { 26 - perf record "$@" -- true 1>/dev/null 2>&1 11 + perf record -o /dev/null "$@" -- true 1>/dev/null 2>&1 27 12 } 28 13 29 14 test_decrease_precise_ip() ··· 34 49 35 50 perf list pmu | grep -q 'mem-loads-aux' || return 2 36 51 37 - if ! perf_record -e '{cpu/mem-loads-aux/S,cpu/mem-loads/PS}'; then 52 + if ! perf_record -e '{mem-loads-aux:S,mem-loads:PS}'; then 38 53 return 1 39 54 fi 40 55 return 0