Commit 198de612 by Jonah Ryan-Davis Committed by Commit Bot

Remove EGLThreadTest to fix angle_end2end_tests failures on Android.

EGLThreadTest doesn't clean up well and the test framework can't handle it well. It caused test failures related to eglMakeCurrent (ELG_BAD_ACCESS) on Android that were masked by retries. Calling eglGetDisplay within a test can cause it to return a cached display from the test runner. The test is unable to know if it should terminate this display. bug: angleproject:3321 Change-Id: I14a539a00acaed4ee71622e7416a6c7a75596606 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1541717 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 208af3eb
...@@ -138,7 +138,6 @@ angle_end2end_tests_sources = [ ...@@ -138,7 +138,6 @@ angle_end2end_tests_sources = [
"egl_tests/EGLSurfacelessContextTest.cpp", "egl_tests/EGLSurfacelessContextTest.cpp",
"egl_tests/EGLSurfaceTest.cpp", "egl_tests/EGLSurfaceTest.cpp",
"egl_tests/EGLSyncTest.cpp", "egl_tests/EGLSyncTest.cpp",
"egl_tests/EGLThreadTest.cpp",
"test_utils/ANGLETest.cpp", "test_utils/ANGLETest.cpp",
"test_utils/ANGLETest.h", "test_utils/ANGLETest.h",
"test_utils/MultiviewTest.cpp", "test_utils/MultiviewTest.cpp",
......
//
// Copyright 2018 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// EGLThreadTest.h: Tests multi-threaded uses of EGL.
#include <gtest/gtest.h>
#include "test_utils/ANGLETest.h"
#include "util/system_utils.h"
#include <thread>
class EGLThreadTest : public EGLTest
{
public:
void threadingTest();
protected:
EGLDisplay mDisplay = EGL_NO_DISPLAY;
};
void EGLThreadTest::threadingTest()
{
mDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
EXPECT_TRUE(mDisplay != EGL_NO_DISPLAY);
eglInitialize(mDisplay, nullptr, nullptr);
eglGetCurrentContext();
}
// Test a bug in our EGL TLS implementation.
TEST_F(EGLThreadTest, ThreadInitCrash)
{
std::thread runner(&EGLThreadTest::threadingTest, this);
// wait for signal from thread
runner.join();
// crash, because the TLS value is NULL on main thread
eglGetCurrentSurface(EGL_DRAW);
eglGetCurrentContext();
eglTerminate(mDisplay);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment