[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241118052638.754981-1-irogers@google.com>
Date: Sun, 17 Nov 2024 21:26:38 -0800
From: Ian Rogers <irogers@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
Ian Rogers <irogers@...gle.com>, Adrian Hunter <adrian.hunter@...el.com>,
Kan Liang <kan.liang@...ux.intel.com>, linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v1] perf test: Correct hwmon test PMU detection
Use name to avoid potential other hwmon PMUs.
Signed-off-by: Ian Rogers <irogers@...gle.com>
---
tools/perf/tests/hwmon_pmu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/tests/hwmon_pmu.c b/tools/perf/tests/hwmon_pmu.c
index 9f44093f18df..1e5f93aaaf5f 100644
--- a/tools/perf/tests/hwmon_pmu.c
+++ b/tools/perf/tests/hwmon_pmu.c
@@ -173,7 +173,8 @@ static int do_test(size_t i, bool with_pmu, bool with_alias)
}
evlist__for_each_entry(evlist, evsel) {
- if (!perf_pmu__is_hwmon(evsel->pmu))
+ if (!evsel->pmu || !evsel->pmu->name ||
+ strcmp(evsel->pmu->name, "hwmon_a_test_hwmon_pmu"))
continue;
if (evsel->core.attr.config != (u64)test_events[i].config) {
--
2.47.0.338.g60cca15819-goog
Powered by blists - more mailing lists