[igt-dev] [PATCH i-g-t 4/5] igt: add timeline test cases
Chris Wilson
chris at chris-wilson.co.uk
Thu May 16 20:03:57 UTC 2019
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
More information about the igt-dev
mailing list