[Piglit] [PATCH] khr-debug: fix broken label test
Ilia Mirkin
imirkin at alum.mit.edu
Thu Jun 18 09:23:08 PDT 2015
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
On Thu, Jun 18, 2015 at 5:06 AM, Timothy Arceri <t_arceri at yahoo.com.au> wrote:
> ---
> tests/spec/khr_debug/debug-object-label.c | 36 ++++++++++++++++++++-----------
> 1 file changed, 24 insertions(+), 12 deletions(-)
>
> diff --git a/tests/spec/khr_debug/debug-object-label.c b/tests/spec/khr_debug/debug-object-label.c
> index 151e684..ad4c9fc 100644
> --- a/tests/spec/khr_debug/debug-object-label.c
> +++ b/tests/spec/khr_debug/debug-object-label.c
> @@ -158,7 +158,8 @@ test_object_label_types()
> ObjectLabel(GL_BUFFER, buffer, -1, TestLabel);
> GetObjectLabel(GL_BUFFER, buffer, TestLabelLen + 1, &length[BUFFER_IDX], label[BUFFER_IDX]);
>
> - check_label_and_length(label[BUFFER_IDX], length[BUFFER_IDX], "GL_BUFFER");
> + pass = check_label_and_length(label[BUFFER_IDX], length[BUFFER_IDX],
> + "GL_BUFFER") && pass;
>
> glDeleteBuffers(1, &buffer);
>
> @@ -169,7 +170,8 @@ test_object_label_types()
> GetObjectLabel(GL_SHADER, shader, TestLabelLen + 1,
> &length[SHADER_IDX], label[SHADER_IDX]);
>
> - check_label_and_length(label[SHADER_IDX], length[SHADER_IDX], "GL_SHADER");
> + pass = check_label_and_length(label[SHADER_IDX], length[SHADER_IDX],
> + "GL_SHADER") && pass;
>
> glDeleteShader(shader);
>
> @@ -179,7 +181,8 @@ test_object_label_types()
> GetObjectLabel(GL_PROGRAM, program, TestLabelLen + 1,
> &length[PROGRAM_IDX], label[PROGRAM_IDX]);
>
> - check_label_and_length(label[PROGRAM_IDX], length[PROGRAM_IDX], "GL_PROGRAM");
> + pass = check_label_and_length(label[PROGRAM_IDX], length[PROGRAM_IDX],
> + "GL_PROGRAM") && pass;
>
> glDeleteProgram(program);
> }
> @@ -193,7 +196,8 @@ test_object_label_types()
> GetObjectLabel(GL_VERTEX_ARRAY, vertexArray, TestLabelLen + 1,
> &length[VERTEX_ARRAY_IDX], label[VERTEX_ARRAY_IDX]);
>
> - check_label_and_length(label[VERTEX_ARRAY_IDX], length[VERTEX_ARRAY_IDX], "GL_VERTEX_ARRAY");
> + pass = check_label_and_length(label[VERTEX_ARRAY_IDX], length[VERTEX_ARRAY_IDX],
> + "GL_VERTEX_ARRAY") && pass;
>
> glDeleteVertexArrays(1, &vertexArray);
> }
> @@ -207,7 +211,8 @@ test_object_label_types()
> GetObjectLabel(GL_RENDERBUFFER, renderbuffer, TestLabelLen + 1,
> &length[RENDERBUFFER_IDX], label[RENDERBUFFER_IDX]);
>
> - check_label_and_length(label[RENDERBUFFER_IDX], length[RENDERBUFFER_IDX], "GL_RENDERBUFFER");
> + pass = check_label_and_length(label[RENDERBUFFER_IDX], length[RENDERBUFFER_IDX],
> + "GL_RENDERBUFFER") && pass;
>
> glDeleteRenderbuffers(1, &renderbuffer);
>
> @@ -218,7 +223,8 @@ test_object_label_types()
> GetObjectLabel(GL_FRAMEBUFFER, framebuffer, TestLabelLen + 1,
> &length[FRAMEBUFFER_IDX], label[FRAMEBUFFER_IDX]);
>
> - check_label_and_length(label[FRAMEBUFFER_IDX], length[FRAMEBUFFER_IDX], "GL_FRAMEBUFFER");
> + pass = check_label_and_length(label[FRAMEBUFFER_IDX], length[FRAMEBUFFER_IDX],
> + "GL_FRAMEBUFFER") && pass;
>
> glDeleteFramebuffers(1, &framebuffer);
> }
> @@ -232,7 +238,8 @@ test_object_label_types()
> ObjectLabel(GL_QUERY, query, -1, TestLabel);
> GetObjectLabel(GL_QUERY, query, TestLabelLen + 1, &length[QUERY_IDX], label[QUERY_IDX]);
>
> - check_label_and_length(label[QUERY_IDX], length[QUERY_IDX], "GL_TEST_QUERY");
> + pass = check_label_and_length(label[QUERY_IDX], length[QUERY_IDX],
> + "GL_TEST_QUERY") && pass;
>
> glDeleteQueries(1, &query);
> }
> @@ -246,7 +253,8 @@ test_object_label_types()
> GetObjectLabel(GL_PROGRAM_PIPELINE, programPipeline, TestLabelLen + 1,
> &length[PROGRAM_PIPELINE_IDX], label[PROGRAM_PIPELINE_IDX]);
>
> - check_label_and_length(label[PROGRAM_PIPELINE_IDX], length[PROGRAM_PIPELINE_IDX], "GL_PROGRAM_PIPELINE");
> + pass = check_label_and_length(label[PROGRAM_PIPELINE_IDX], length[PROGRAM_PIPELINE_IDX],
> + "GL_PROGRAM_PIPELINE") && pass;
>
> glDeleteProgramPipelines(1, &programPipeline);
> }
> @@ -261,7 +269,8 @@ test_object_label_types()
> GetObjectLabel(GL_TRANSFORM_FEEDBACK, transformFeedback, TestLabelLen + 1,
> &length[TRANSFORM_FEEDBACK_IDX], label[TRANSFORM_FEEDBACK_IDX]);
>
> - check_label_and_length(label[TRANSFORM_FEEDBACK_IDX], length[TRANSFORM_FEEDBACK_IDX], "GL_TRANSFORM_FEEDBACK");
> + pass = check_label_and_length(label[TRANSFORM_FEEDBACK_IDX], length[TRANSFORM_FEEDBACK_IDX],
> + "GL_TRANSFORM_FEEDBACK") && pass;
>
> glDeleteTransformFeedbacks(1, &transformFeedback);
> }
> @@ -274,7 +283,8 @@ test_object_label_types()
> ObjectLabel(GL_SAMPLER, sampler, -1, TestLabel);
> GetObjectLabel(GL_SAMPLER, sampler, TestLabelLen + 1, &length[SAMPLER_IDX], label[SAMPLER_IDX]);
>
> - check_label_and_length(label[SAMPLER_IDX], length[SAMPLER_IDX], "GL_SAMPLER");
> + pass = check_label_and_length(label[SAMPLER_IDX], length[SAMPLER_IDX],
> + "GL_SAMPLER") && pass;
>
> glDeleteSamplers(1, &sampler);
> }
> @@ -285,7 +295,8 @@ test_object_label_types()
> ObjectLabel(GL_TEXTURE, texture, -1, TestLabel);
> GetObjectLabel(GL_TEXTURE, texture, TestLabelLen + 1, &length[TEXTURE_IDX], label[TEXTURE_IDX]);
>
> - check_label_and_length(label[TEXTURE_IDX], length[TEXTURE_IDX], "GL_TEXTURE");
> + pass = check_label_and_length(label[TEXTURE_IDX], length[TEXTURE_IDX],
> + "GL_TEXTURE") && pass;
>
> glDeleteTextures(1, &texture);
>
> @@ -297,7 +308,8 @@ test_object_label_types()
> ObjectLabel(GL_DISPLAY_LIST, displayList, -1, TestLabel);
> GetObjectLabel(GL_DISPLAY_LIST, displayList, TestLabelLen + 1, &length[DISPLAY_LIST_IDX], label[DISPLAY_LIST_IDX]);
>
> - check_label_and_length(label[DISPLAY_LIST_IDX], length[DISPLAY_LIST_IDX], "GL_DISPLAY_LIST");
> + pass = check_label_and_length(label[DISPLAY_LIST_IDX], length[DISPLAY_LIST_IDX],
> + "GL_DISPLAY_LIST") && pass;
>
> glDeleteLists(displayList, 1);
> #endif /* PIGLIT_USE_OPENGL */
> --
> 2.1.0
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
More information about the Piglit
mailing list