perf test: Make stat bpf counters test more robust
authorIan Rogers <irogers@google.com>
Thu, 17 Jun 2021 18:42:16 +0000 (11:42 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 18 Jun 2021 16:50:05 +0000 (13:50 -0300)
commita49ed2b4e2e5eed0b5082f7f5d36123c0070b9ab
treef14553568f015a013c20451be7f2d927cc040b93
parent2638fbd351e8cdc3bca266004b6d348063153c3b
perf test: Make stat bpf counters test more robust

If the test is run on a hypervisor then the cycles event may not be
counted, skip the test in this situation. Fail the test if cycles are
not counted in the subsequent bpf counter run.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: bpf@vger.kernel.org
Link: http://lore.kernel.org/lkml/20210617184216.2075588-4-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/shell/stat_bpf_counters.sh