Commit ae42fedf authored by Antonio Argenziano's avatar Antonio Argenziano

tests/i915/gem_exec_balancer: Skip the test if no perf engines are available

Require that the test can access perf engines files. This patch also fixes
the error check for perf_i915_open().

	- Skip based on valid perf type ID. (Chris)
Signed-off-by: Antonio Argenziano's avatarAntonio Argenziano <>

Cc: Chris Wilson <>
Cc: Tvrtko Ursulin <>
Reviewed-by: Chris Wilson's avatarChris Wilson <>
parent 00a64098
Pipeline #107806 passed with stages
in 7 minutes and 30 seconds
......@@ -61,7 +61,7 @@ static bool has_class_instance(int i915, uint16_t class, uint16_t instance)
int fd;
fd = perf_i915_open(i915, I915_PMU_ENGINE_BUSY(class, instance));
if (fd != -1) {
if (fd >= 0) {
return true;
......@@ -113,6 +113,11 @@ list_engines(int i915, uint32_t class_mask, unsigned int *out)
return engines;
static bool has_perf_engines(int i915)
return i915_perf_type_id(i915);
static int __set_engines(int i915, uint32_t ctx,
const struct i915_engine_class_instance *ci,
unsigned int count)
......@@ -1818,6 +1823,7 @@ igt_main
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment