diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-11-22 18:02:29 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-11-23 07:25:53 +0000 |
commit | 6a15ccfb9d4612e2b4797387b8b13457a17e5c02 (patch) | |
tree | e70894da1ed80734f4a6ccc9427b233a1a10eee0 /tests | |
parent | e2d8057598e78d466167b9a89c18e63324a8cc1f (diff) |
igt/perf_pmu: Tidy skip message for unsupported kernels
Use a more compact expression to detect when the kernel doesn't support
perf.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/perf_pmu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c index f4de3ec7..237d362a 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; |