From 2a2a2ab8c79d7c4c6aa8bcdf15be42269e96c9a2 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 2 Feb 2017 10:40:02 -0800 Subject: [PATCH] Fix a few bugs in a EGL_KHR_no_config_context test. The dEQP-EGL.functional.create_context.no_config test had the eglBindAPI check backwards - so it was skipping APIs assuming they failed when they actually succeeded. Secondly, it failed to actually set the test result to "pass" if all cases passed, which led to assertion failures: Assertion `testResult != QP_TEST_RESULT_LAST' failed. Change-Id: I7a20467012fd6c174f79679bbf640917c327574c --- modules/egl/teglCreateContextTests.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/egl/teglCreateContextTests.cpp b/modules/egl/teglCreateContextTests.cpp index 17592cd..b107d67 100644 --- a/modules/egl/teglCreateContextTests.cpp +++ b/modules/egl/teglCreateContextTests.cpp @@ -128,11 +128,13 @@ public: if (!eglu::hasExtension(egl, *display, "EGL_KHR_no_config_context")) TCU_THROW(NotSupportedError, "EGL_KHR_no_config_context is not supported"); + m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "pass"); + for (int apiNdx = 0; apiNdx < (int)DE_LENGTH_OF_ARRAY(s_apis); apiNdx++) { const EGLenum api = s_apis[apiNdx].api; - if (egl.bindAPI(api) != EGL_FALSE) + if (egl.bindAPI(api) == EGL_FALSE) { TCU_CHECK(egl.getError() == EGL_BAD_PARAMETER); log << TestLog::Message << "eglBindAPI(" << eglu::getAPIStr(api) << ") failed, skipping" << TestLog::EndMessage; -- 2.7.4