[Piglit] [PATCH] egl-context-priority: Check eglInitialize result.
Tapani Pälli
tapani.palli at intel.com
Thu May 4 04:51:42 UTC 2017
Thanks!
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
On 05/04/2017 01:46 AM, Vinson Lee wrote:
> Fix Coverity unchecked return value defect.
>
> CID: 1405779
> Fixes: 7d0182b88cda ("egl: API test for EGL_IMG_context_priority extension")
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> tests/egl/egl-context-priority.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tests/egl/egl-context-priority.c b/tests/egl/egl-context-priority.c
> index afafcee482cc..7f26fc614ea3 100644
> --- a/tests/egl/egl-context-priority.c
> +++ b/tests/egl/egl-context-priority.c
> @@ -85,6 +85,7 @@ piglit_init(int argc, char **argv)
> EGLContext ctx;
> EGLint expect;
> EGLint attr[] = { EGL_NONE, EGL_NONE, EGL_NONE };
> + bool ok;
>
> /* Supported priority levels from extension spec. */
> EGLenum levels[] = {
> @@ -101,7 +102,10 @@ piglit_init(int argc, char **argv)
> dpy = eglGetPlatformDisplay(EGL_PLATFORM_SURFACELESS_MESA,
> EGL_DEFAULT_DISPLAY, NULL);
>
> - eglInitialize(dpy, &major, &minor);
> + ok = eglInitialize(dpy, &major, &minor);
> + if (!ok) {
> + piglit_report_result(PIGLIT_FAIL);
> + }
>
> piglit_require_egl_extension(dpy, "EGL_IMG_context_priority");
> piglit_require_egl_extension(dpy, "EGL_MESA_configless_context");
>
More information about the Piglit
mailing list