[igt-dev] [PATCH i-g-t 4/5] igt: add timeline test cases

Lionel Landwerlin lionel.g.landwerlin at intel.com
Fri May 17 16:39:03 UTC 2019


On 16/05/2019 21:03, Chris Wilson wrote:
> Quoting Lionel Landwerlin (2019-05-16 15:39:49)
>> +static int
>> +__syncobj_timeline_signal(int fd, uint32_t *handles, uint64_t *points, uint32_t count)
>> +{
>> +       struct drm_syncobj_timeline_array array = { 0 };
> Note you can use the gcc {} extension here.
>
>> +       int err = 0;
>> +
>> +       array.handles = to_user_pointer(handles);
>> +       array.points = to_user_pointer(points);
>> +       array.count_handles = count;
>> +       if (drmIoctl(fd, DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL, &array))
>> +               err = -errno;
> Clear errno afterwards, it just gets left around and messes up assert
> strings.
>
> Use igt_assume(err) otherwise Petri will have to silence coverity later.
>
> Use igt_ioctl() instead of drmIoctl() so that we can replace the
> drmIoctl() with the fancy error/signal injection wrappers or whatever
> takes our fancy later.
> -Chris
>
Thanks,

Applied the changes locally, will resend next week just in case more 
comments appear.


-Lionel



More information about the igt-dev mailing list