Use a more compact expression to detect when the kernel doesn't support perf. Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> --- tests/perf_pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c index dd7a1761..e2d2caba 100644 --- a/tests/perf_pmu.c +++ b/tests/perf_pmu.c @@ -51,7 +51,7 @@ static int open_pmu(uint64_t config) int fd; fd = perf_i915_open(config); - igt_require(fd >= 0 || (fd < 0 && errno != ENODEV)); + igt_skip_on(fd < 0 && errno == ENODEV); igt_assert(fd >= 0); return fd; @@ -62,7 +62,7 @@ static int open_group(uint64_t config, int group) int fd; fd = perf_i915_open_group(config, group); - igt_require(fd >= 0 || (fd < 0 && errno != ENODEV)); + igt_skip_on(fd < 0 && errno == ENODEV); igt_assert(fd >= 0); return fd; -- 2.15.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx