perf test: Update event group check for support of uncore event
authorAthira Rajeev <atrajeev@linux.vnet.ibm.com>
Wed, 7 Dec 2022 16:58:15 +0000 (22:28 +0530)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 14 Dec 2022 14:23:36 +0000 (11:23 -0300)
commit232b82d201cbade4f15e243bc0472ac241239d8c
treea4f48c21c0bf256f14dce0cd8c91a0a8d3a89288
parentb9a49f8cb02f08592054b953adcacecd59b7ae4b
perf test: Update event group check for support of uncore event

The event group test checks group creation for combinations of hw, sw
and uncore PMU events. Some of the uncore pmus may require additional
permission to access the counters.

For example, in case of hv_24x7, partition need to have permissions to
access hv_24x7 pmu counters. If not, event_open will fail. Hence add a
sanity check to see if event_open succeeds before proceeding with the
test.

Fixes: 9d9b22bedad13d96 ("perf test: Add event group test for events in multiple PMUs")
Signed-off-by: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
Acked-by: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: Disha Goel <disgoel@linux.ibm.com>
Cc: Ian Rogers <irogers@google.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nageswara R Sastry <rnsastry@linux.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Link: https://lore.kernel.org/r/20221207165815.774-1-atrajeev@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/event_groups.c