Quoting Lionel Landwerlin (2017-12-08 15:39:15) > We mostly run tests on the most recent kernels but those are failing > on < 4.14. > > Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@xxxxxxxxx> > --- > tests/perf.c | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/tests/perf.c b/tests/perf.c > index 969b8c74..71f64caf 100644 > --- a/tests/perf.c > +++ b/tests/perf.c > @@ -3964,6 +3964,17 @@ static void i915_perf_remove_config(int fd, uint64_t config_id) > &config_id), 0); > } > > +static bool has_i915_perf_userspace_config(int fd) > +{ > + uint64_t config = 0; > + int ret = igt_ioctl(fd, DRM_IOCTL_I915_PERF_REMOVE_CONFIG, &config); > + igt_assert_eq(ret, -1); > + > + igt_debug("errno=%i\n", errno); > + > + return errno != EINVAL; > +} > + > static void > test_invalid_create_userspace_config(void) > { > @@ -3973,6 +3984,8 @@ test_invalid_create_userspace_config(void) > uint32_t mux_regs[] = { 0x9888 /* NOA_WRITE */, 0x0 }; > uint32_t invalid_mux_regs[] = { 0x12345678 /* invalid register */, 0x0 }; > > + igt_skip_on(!has_i915_perf_userspace_config(drm_fd)); If you write igt_skip_on(!cond), think igt_require(cond). It just produces a more readable string. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx