Fix for test egl_khr_create_context/default-minor-version-gl.

According to comments in the test: "The Linux OpenGL ABI only requires
OpenGL 1.2, so this might fail to create a context." If the driver failed
to create a 2.x context, then the test failed. This patch changes it to
skip.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59510
Reported-by: Lu Hua <[email protected]>
CC: Matt Turner <[email protected]>
Signed-off-by: Chad Versace <[email protected]>
---
 tests/egl/spec/egl_khr_create_context/default-minor-version-gl.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/egl/spec/egl_khr_create_context/default-minor-version-gl.c 
b/tests/egl/spec/egl_khr_create_context/default-minor-version-gl.c
index ef61067..77050df 100644
--- a/tests/egl/spec/egl_khr_create_context/default-minor-version-gl.c
+++ b/tests/egl/spec/egl_khr_create_context/default-minor-version-gl.c
@@ -54,8 +54,10 @@ int main(int argc, char **argv)
         */
        ctx = eglCreateContext(egl_dpy, cfg, EGL_NO_CONTEXT, attribs);
        if (ctx == EGL_NO_CONTEXT) {
-               fprintf(stderr, "eglCreateContext() failed\n");
-               piglit_report_result(PIGLIT_FAIL);
+               fprintf(stderr, "eglCreateContext() failed with "
+                               "EGL_CONTEXT_MAJOR_VERSION_KHR=%d. skipping "
+                               "test.\n", attribs[1]);
+               piglit_report_result(PIGLIT_SKIP);
        }
 
        if (!eglMakeCurrent(egl_dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, ctx)) {
-- 
1.8.1.1

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

Reply via email to