diff options
| author | Ian Rogers <irogers@google.com> | 2025-11-12 11:53:10 -0800 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2025-11-16 23:24:00 -0800 |
| commit | efee18981aeebc14d6fa06f7556a6df1bd1acf92 (patch) | |
| tree | 44d6bd2aa1db8c9624f16b24e7569f6c9c41d024 /tools/perf/tests | |
| parent | d3726d4e5bd70e2c159ecb9feb43d3eaa6d76020 (diff) | |
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>
Diffstat (limited to 'tools/perf/tests')
| -rw-r--r-- | tools/perf/tests/mmap-basic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/tests/mmap-basic.c b/tools/perf/tests/mmap-basic.c index 3c89d3001887..3313c236104e 100644 --- a/tools/perf/tests/mmap-basic.c +++ b/tools/perf/tests/mmap-basic.c @@ -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; |
