Re: [PATCH igt 3/3] igt/perf_pmu: Tidy skip message for unsupported kernels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@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;


The larger the framework the smaller the chance of knowing it. :)

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux