On Thu, 2016-07-21 at 12:50 -0700, Eric Anholt wrote:
> Adam Jackson <[email protected]> writes:
> >      g(['egl_ext_device_query'], 'conformance')
> >  
> >  with profile.group_manager(
> > +        PiglitGLTest,
> > +        grouptools.join('spec', 'egl_ext_device_enumeration'),
> > +        exclude_platforms=['glx']) as g:
> > +    g(['egl_ext_device_enumeration'], 'conformance')
> > +
> 
> Maybe sort above ext_device_query?  (are we sorting?)

I have no idea, I just copied some boilerplate here. If there's a sort
order at all then _query should come before _enumerate since the latter
depends on the former.

> > +   memset(devs, 0, sizeof devs);
> > +   if (queryDevices(numdevs, devs, &numdevs) == EGL_FALSE) {
> > +           printf("Failed to enumerate devices\n");
> > +           piglit_report_result(PIGLIT_FAIL);
> > +   }
> 
> I think you want ARRAY_SIZE(devs) as the first arg.

I don't think I do? Especially...

> I'd like, after the call, to iterate over numdevs and make sure that
> they're not still NULL.  This seems like too little of a touch-test
> without that.

... if I do this, I should also check that devs slots beyond what I
asked for aren't touched.

> Possible additional tests:
> 
> - queryDevices(0, devs, &numdevs) throws EGL_BAD_PARAMETER.
> - queryDevices(-1, devs, &numdevs) throws EGL_BAD_PARAMETER.
> - queryDevices(ARRAY_SIZE(devs), devs, NULL) throws EGL_BAD_PARAMETER.

Indeed. Will update these two and re-send, thanks for the review.

- ajax
_______________________________________________
Piglit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to