Self-contained regression test for the grouping-only paths:
- allocate two deferred PMCs, group them, commit, attach, start, stop, read, release;
- all-or-none semantics: build a 4-event group on a 6-counter Zen, expect commit to succeed; build a (cores+1)-event group, expect ENOSPC;
- row exclusivity: assigner gives each sibling a distinct global ri.
The probe_core_pmcs() helper allocates "instructions" counters until
EBUSY/EAGAIN to discover the actual core-PMC count at run time
(pmc_npmc(0) returns the sum across classes -- e.g., 47 on Zen5 --
which is wrong for sizing CORE-class group tests). Every sibling is
also explicitly pmc_attach()-ed before pmc_start(), now mandatory
under multiplexing semantics.
A companion pmcstat_test.sh exercises the pmcstat(8) -b / {a,b,c}
brace syntax end to end (basic group, two groups, system mode,
sampling, single-element brace, mixed grouped/ungrouped, malformed
brace, and an over-subscribed multiplex group). The regression
Makefile invokes it from "make check-root" when present.
The C test is x86-only (PMC_CLASS_K8) and skips itself politely on
hosts that do not have AMD core PMCs; the shell test SKIPs on
non-AMD CPUs.
Sponsored by: AMD
Signed-off-by: Raghavendra K T <raghavendra.kt@amd.com>