The events in test_cpu_aliases[] or test_uncore_aliases[] are checked
against the events from pmu-events/arch/test/test_cpu/*.json
I don't understand the benefit of this.. so IIUC:
- jevents will go through arch/test and populate pmu-events/pmu-events.c
with:
struct pmu_event pme_test_cpu[] ...
struct pmu_events_map pmu_events_map_test ...
- so we actualy have the parsed json events in C structs and we can go
through them and check it contains fields with strings that we expect
- you go through all detected pmus and check if the tests events we
generated are matching some of the events from these pmus,
and that's where I'm lost ;-) why?
or as I'm thinking about that now, would it be enough
to check pme_test_cpu array to have string that we
expect?
Right, I might change this.
So currently we iterate the PMU aliases to ensure that we have a matching
event in pme_test_cpu[]. It may be better to iterate the events in
pme_test_cpu[] to ensure that we have an alias.
that's what I described above.. I dont understand the connection/value
of this tests
The problem here is uncore PMUs. They have the "Unit" field, which is used
for matching the PMU. So we cannot ensure test events from uncore.json will
always have an event alias created per PMU. But maybe I could use
pmu_uncore_alias_match() to check if the test event matches in this case.
hum I guess I don't follow all the details.. but some more explanation
of the test would be great