Commit 6d93a633 by Nicolas Capens Committed by Nicolas Capens

Regres: limit the number of GL tests opening X connections

Reduce the number of OpenGL and EGL tests to 16, to avoid exceeding the maximum number of X clients. Also make the attempts to open an X display back off exponentially instead of linearly. Bug: b/153322216 Change-Id: Ifb91d9b892dc4b5f6d26f369f2bece454b0bae87 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48969Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com>
parent cbb5a10e
...@@ -29,7 +29,7 @@ index dfe09d060..b4493e431 100644 ...@@ -29,7 +29,7 @@ index dfe09d060..b4493e431 100644
+ m_display = XOpenDisplay((char*)name); // Won't modify argument string. + m_display = XOpenDisplay((char*)name); // Won't modify argument string.
+ if (m_display) + if (m_display)
+ break; + break;
+ deSleep(100*(1+i)); + deSleep(100*(1<<i));
+ } + }
if (!m_display) if (!m_display)
throw ResourceError("Failed to open display", name, __FILE__, __LINE__); throw ResourceError("Failed to open display", name, __FILE__, __LINE__);
......
...@@ -179,9 +179,21 @@ func (c *Config) Run() (*Results, error) { ...@@ -179,9 +179,21 @@ func (c *Config) Run() (*Results, error) {
// Build a chan for the test names to be run. // Build a chan for the test names to be run.
tests := make(chan string, len(list.Tests)) tests := make(chan string, len(list.Tests))
numParallelTests := c.NumParallelTests
if list.API != testlist.Vulkan {
// OpenGL tests attempt to open lots of X11 display connections,
// which may cause us to run out of handles. This maximum was
// determined experimentally on a 72-core system.
maxParallelGLTests := 16
if numParallelTests > maxParallelGLTests {
numParallelTests = maxParallelGLTests
}
}
// Start a number of go routines to run the tests. // Start a number of go routines to run the tests.
wg.Add(c.NumParallelTests) wg.Add(numParallelTests)
for i := 0; i < c.NumParallelTests; i++ { for i := 0; i < numParallelTests; i++ {
go func(index int) { go func(index int) {
c.TestRoutine(exe, tests, results, index, supportsCoverage) c.TestRoutine(exe, tests, results, index, supportsCoverage)
wg.Done() wg.Done()
......
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