mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 11:06:41 -05:00
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>
This commit is contained in:
@@ -322,7 +322,7 @@ static int test_stat_user_read(u64 event, enum user_read_state enabled)
|
||||
}
|
||||
|
||||
perf_evsel__read(evsel, 0, 0, &counts);
|
||||
if (counts.val == 0) {
|
||||
if (rdpmc_supported && counts.val == 0) {
|
||||
pr_err("User space counter reading for PMU %s [Failed read]\n", pmu->name);
|
||||
ret = TEST_FAIL;
|
||||
goto cleanup;
|
||||
|
||||
Reference in New Issue
Block a user