[Piglit] [PATCH v3] gl30basic: add some extra suspected extension

Brian Paul brianp at vmware.com
Tue Jun 27 14:09:44 UTC 2017


On 06/27/2017 07:52 AM, Sandra Koroniewska wrote:
> WGL_EXT_SWAP_CONTROL is added for historical reasons.
> ---
>   tests/general/gl30basic.c | 13 +++++++------
>   1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/tests/general/gl30basic.c b/tests/general/gl30basic.c
> index 2207787bb..d6bcd34ad 100644
> --- a/tests/general/gl30basic.c
> +++ b/tests/general/gl30basic.c
> @@ -95,12 +95,13 @@ test_extension_list(void)
>         const GLubyte *ext = glGetStringi(GL_EXTENSIONS, k);
>         if (0)
>            printf("Ext[%d] = %s\n", k, (char *) ext);
> -      if (!ext ||
> -          ext[0] != 'G' ||
> -          ext[1] != 'L' ||
> -          ext[2] != '_') {
> -         printf("%s: bad extension string [%d]: %s\n", Prog, k, ext);
> -         return PIGLIT_FAIL;
> +      if (!ext || strncmp(ext, "GL_", 3))
> +      {
> +          if (strncmp(ext, "WGL_EXT_swap_control", 20))
> +          {
> +              printf("%s: bad extension string [%d]: %s\n", Prog, k, ext);
> +              return PIGLIT_FAIL;
> +          }
>         }
>         if (strchr((char *) ext, ' ')) {
>            printf("%s: extension string [%d] contains a space: %s\n", Prog, k, ext);
>

The opening braces should go on the same line as the if statements.

I think I suggested last time to add a comment about why we're testing 
for WGL_EXT_swap_control.

-Brian



More information about the Piglit mailing list