[Intel-gfx] [PATCH v6 i-g-t] igt/perf: add tests to verify create/destroy userspace configs

Chris Wilson chris at chris-wilson.co.uk
Thu Aug 3 15:09:02 UTC 2017


Quoting Lionel Landwerlin (2017-08-03 15:42:48)
> On 03/08/17 15:21, Matthew Auld wrote:
> > On 28 July 2017 at 18:12, Lionel Landwerlin
> >> +       /* Verify that destroying the config doesn't yield any error. */
> >> +       igt_ioctl(drm_fd, DRM_IOCTL_I915_PERF_REMOVE_CONFIG, &config_id);
> >> +
> >> +       /* Read the config to verify shouldn't raise any issue. */
> > Read the config? Add back the config while in use?
> 
> Thanks, that's indeed adding it back.
> Will fix.
> 
> >
> >> +       config_id = i915_perf_add_config(drm_fd, &config);
> > Check the return value for potential error?
> 
> This wrapper function already checks for errors.

Ah, but does the kernel guarantee that a reuse of an active
config-string gives the same config-id? If so 
igt_assert_eq(config_id2, config_id1);
-Chris


More information about the Intel-gfx mailing list