[Intel-gfx] [PATCH igt 3/3] igt/perf_pmu: Tidy skip message for unsupported kernels
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Wed Nov 22 20:07:41 UTC 2017
On 22/11/2017 18:05, Chris Wilson wrote:
> 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;
>
The larger the framework the smaller the chance of knowing it. :)
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Regards,
Tvrtko
More information about the Intel-gfx
mailing list