[PATCH i-g-t] tests/intel/xe_pmu: Skip tests involving engine activity on vm
Soham Purkait
soham.purkait at intel.com
Tue Jul 15 07:00:17 UTC 2025
Skip the tests and subtests involving the engine activity on vm
as engine activity events are not present on vm.
Signed-off-by: Soham Purkait <soham.purkait at intel.com>
---
tests/intel/xe_pmu.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/tests/intel/xe_pmu.c b/tests/intel/xe_pmu.c
index 0e5a7360f..9ac9d38cf 100644
--- a/tests/intel/xe_pmu.c
+++ b/tests/intel/xe_pmu.c
@@ -113,6 +113,17 @@ static int total_exec_quantum;
igt_dynamic_f("engine-%s%d", xe_engine_class_string(hwe->engine_class), \
hwe->engine_instance)
+static bool igt_is_running_on_vm(const char *device)
+{
+ char buf[512];
+
+ snprintf(buf, sizeof(buf),
+ "/sys/bus/event_source/devices/%s/events/%s",
+ device,
+ "engine-active-ticks");
+ return (!!access(buf, F_OK));
+}
+
static int open_pmu(int xe, uint64_t config)
{
int fd;
@@ -191,6 +202,8 @@ static uint64_t get_event_config(unsigned int gt, struct drm_xe_engine_class_ins
uint64_t pmu_config = 0;
int ret;
+ igt_skip_on(igt_is_running_on_vm(xe_device));
+
ret = perf_event_config(xe_device, event, &pmu_config);
igt_assert(ret >= 0);
pmu_config |= add_format_config("gt", gt);
--
2.34.1
More information about the igt-dev
mailing list