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

Lionel Landwerlin lionel.g.landwerlin at intel.com
Thu Aug 3 15:13:42 UTC 2017


On 03/08/17 16:09, Chris Wilson wrote:
> 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
>

Sounds like implementation details to me... no?

In the current implementation there is no relationship between the 
config-string/uuid and the config-id.
The config-id is likely to be the number of already present configs in 
the kernel.



More information about the Intel-gfx mailing list