[Piglit] [PATCH] glx-shader-sharing: Report failure instead of crash on assert.

Vinson Lee vlee at freedesktop.org
Fri Mar 4 22:48:12 UTC 2016


Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/glx/glx-shader-sharing.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/glx/glx-shader-sharing.c b/tests/glx/glx-shader-sharing.c
index 1a022c09e0e5..b8df9b4c8706 100644
--- a/tests/glx/glx-shader-sharing.c
+++ b/tests/glx/glx-shader-sharing.c
@@ -102,7 +102,9 @@ draw(Display *dpy)
    frag_shader = piglit_compile_shader_text(GL_FRAGMENT_SHADER, frag_shader_text);
    program = piglit_link_simple_program(vert_shader, frag_shader);
    check_error(__LINE__);
-   assert(program);
+   if (!program) {
+      piglit_report_result(PIGLIT_FAIL);
+   }
 
    glUseProgram(program);
    check_error(__LINE__);
-- 
2.5.0



More information about the Piglit mailing list