[Piglit] [PATCH 1/2] egl: Add sanity test for EGL_EXT_device_query
Adam Jackson
ajax at redhat.com
Thu Jul 21 21:48:12 UTC 2016
On Thu, 2016-07-21 at 12:37 -0700, Eric Anholt wrote:
> Adam Jackson <ajax at redhat.com> writes:
> > +
> > +/**
> > + * \file
> > + *
> > + * Tests for EGL_EXT_device_query
> > + */
>
> I don't think "\file" works without a file mentioned. Maybe just drop
> this comment entirely, since it seems pretty empty.
It might not! I started by cloning egl_khr_get_all_proc_addresses.c
(hence the Intel copyright) which also has an empty \file.
> > + if ((devstring = queryDeviceString(dpy, EGL_EXTENSIONS)) == NULL) {
> > + printf("Empty device extension string\n");
> > + piglit_report_result(PIGLIT_WARN);
> > + }
>
> Style nitpick: I'd prefer moving the assignment out of the conditional.
Sure.
> Possible additional tests:
>
> - Make sure that EGL_NOT_INTIIALIZED is errored from
> queryDisplayAttrib before eglInitialize().
>
> - Make sure that EGL_NOT_INTIIALIZED is errored from
> queryDisplayAttrib(dpy, 0x0d0d0d0)
EGL_BAD_ATTRIBUTE I think you mean?
> - Make sure that EGL_BAD_DEVICE_EXT is returned from
> queryDeviceString(EGL_NO_DEVICE_EXT, EGL_EXTENSIONS)
I think this is sane? I'm trying to imagine something like the client
extension trick for display extensions and I don't think that really
makes sense. Can always fix the test after if EGL_NO_DEVICE suddenly
becomes meaningful I guess.
> - Make sure that EGL_BAD_PARAMETER is returned from
> queryDeviceString(queryDeviceString(device, 0xd0d0d0d0)
>
> - Make sure that eglQueryDeviceAttribEXT is also
> eglGetProcAddress()able.
>
> - Make sure that queryDeviceAttrib(device, 0xd0d0d0d0) throws
> EGL_BAD_ATTRIBUTE
>
> (We can't test EGL_BAD_DEVICE from that function because we don't have a
> valid attrib to use)
Yeah, plan is to add separate tests for for EGL_EXT_device_drm. I might
or might not end up writing a spec for EGL_EXT_device_glx, remains to
be seen whether that's useful.
- ajax
More information about the Piglit
mailing list