[Intel-gfx] [PATCH igt 3/3] igt/perf_pmu: Tidy skip message for unsupported kernels
Chris Wilson
chris at chris-wilson.co.uk
Wed Nov 22 18:05:23 UTC 2017
Use a more compact expression to detect when the kernel doesn't support
perf.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
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
More information about the Intel-gfx
mailing list