[Piglit] [PATCH 1/3] piglit-util-gl: Add piglit_get_gl_enum_from_name

Dylan Baker baker.dylan.c at gmail.com
Wed Feb 18 16:39:48 PST 2015


On Wed, Feb 18, 2015 at 11:34:55PM +0000, Emil Velikov wrote:
> On 18 February 2015 at 23:26, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> > On Wed, Feb 18, 2015 at 6:20 PM, Jordan Justen
> > <jordan.l.justen at intel.com> wrote:
> >> On 2015-02-18 14:32:29, Jordan Justen wrote:
> >>> diff --git a/tests/util/piglit-util-gl.h b/tests/util/piglit-util-gl.h
> >>> index 0f8eb81..fa4a6e4 100644
> >>> --- a/tests/util/piglit-util-gl.h
> >>> +++ b/tests/util/piglit-util-gl.h
> >>> @@ -87,6 +87,15 @@ const char* piglit_get_gl_error_name(GLenum error);
> >>>  const char *piglit_get_gl_enum_name(GLenum param);
> >>>
> >>>  /**
> >>> + * \brief Convert a string to a GL enum.
> >>> + *
> >>> + * For example, given "GL_INVALID_ENUM", return GL_INVALID_ENUM.
> >>> + *
> >>> + * abort() if the string is not recognized.
> >>
> >> Any suggestions for a better action if the string is not recognized?
> >
> > I think abort is fine here. The test is completely broken if the
> > string's not recognized.
> Fair enough. I'm not sure how our python runner interprets the abort's
> return code - pass/fail/crash. But I would assume that a warning
> message will be useful (alongside the abort()).

Does it set a non-zero returncode? If it does that will be fail (99%
sure).

We can always override that for ShaderTest (shader runner) to consider
certain return codes crash too.

> 
> Feel free to ignore that idea.
> 
> -Emil
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150218/6e50856f/attachment.sig>


More information about the Piglit mailing list