Accept EGL_BAD_PARAMETER for eglCreatePixmapSurface negative test
authorasagarwal <asagarwal@nvidia.com>
Thu, 7 Dec 2017 05:05:04 +0000 (10:35 +0530)
committerasagarwal <asagarwal@nvidia.com>
Mon, 18 Dec 2017 12:01:53 +0000 (17:31 +0530)
Running CTS conformance test on wayland results in test failure for
dEQP-EGL.functional.negative_api.create_pixmap_surface, since the test
expects EGL_BAD_CONFIG, but actual returned error is EGL_BAD_PARAMETER.

According to EGL_EXT_platform_wayland spec,
(https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_platform_wayland.txt)
any call to eglCreatePlatformPixmapSurfaceEXT() on wayland will return
EGL_BAD_PARAMETER.

Ideally, both eglCreatePixmapSurface() and
eglCreatePlatformPixmapSurfaceEXT() should be considered the same, since
internally both calls do the same thing.

This is one of those situations where multiple errors could be reported
given that multiple invalid parameters are provided (invalid platform +
invalid config).

This change accepts both error values EGL_BAD_CONFIG and
EGL_BAD_PARAMETER for eglCreatePixmapSurface negative test.

VK-GL-CTS public issue: 68

Affects: dEQP-EGL.functional.negative_api.create_pixmap_surface
Test: Run the test on wayland platforms
Components: AOSP

Change-Id: Ic20e22a1916e2901acbf37faa86d1f7644465dab

modules/egl/teglNegativeApiTests.cpp

index b0bd938..1d7da07 100644 (file)
@@ -685,10 +685,10 @@ void NegativeApiTests::init (void)
 
                        log << TestLog::EndSection;
 
-                       log << TestLog::Section("Test2", "EGL_BAD_CONFIG is generated if config is not an EGL frame buffer configuration");
+                       log << TestLog::Section("Test2", "EGL_BAD_CONFIG or EGL_BAD_PARAMETER is generated if config is not an EGL frame buffer configuration or if the PixmapSurface call is not supported");
 
                        expectNoSurface(eglCreatePixmapSurface(display, (EGLConfig)-1, DE_NULL, s_emptyAttribList));
-                       expectError(EGL_BAD_CONFIG);
+                       expectEitherError(EGL_BAD_CONFIG, EGL_BAD_PARAMETER);
 
                        log << TestLog::EndSection;
                });