Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf test: Don't fail if user rdpmc returns 0 when disabled

In certain hypervisor set ups the value 0 may be returned but this is
only erroneous if the user rdpmc isn't disabled.

Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

authored by

Ian Rogers and committed by
Namhyung Kim
efee1898 d3726d4e

+1 -1
+1 -1
tools/perf/tests/mmap-basic.c
··· 322 322 } 323 323 324 324 perf_evsel__read(evsel, 0, 0, &counts); 325 - if (counts.val == 0) { 325 + if (rdpmc_supported && counts.val == 0) { 326 326 pr_err("User space counter reading for PMU %s [Failed read]\n", pmu->name); 327 327 ret = TEST_FAIL; 328 328 goto cleanup;