Commit f80c4be2 authored by George Steel's avatar George Steel Committed by Commit Bot

Raise Xvfb client limit in run_web_tests.py

Follow-up to:
https://chromium-review.googlesource.com/c/chromium/src/+/2343314
Ensure x11::Connection is only used on a single thread

Due to the above changes, content_shell now uses more X11 connections
per instance than previously. On machines with hugh numbers of cores,
this was causing run_web_tests to crash as the tests it ran tried to
more connections at a time than the default limit (256) of its Xvfb
instance allowed.

Bug: 1120107
Change-Id: Ie31fb509e91a9d7828b5f26f2b3885f857c56e24
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2368420
Commit-Queue: George Steel <gtsteel@chromium.org>
Reviewed-by: default avatarRobert Ma <robertma@chromium.org>
Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800640}
parent 9f129d87
...@@ -191,7 +191,7 @@ class LinuxPort(base.Port): ...@@ -191,7 +191,7 @@ class LinuxPort(base.Port):
self._xvfb_process = self.host.executive.popen( self._xvfb_process = self.host.executive.popen(
[ [
'Xvfb', display, '-screen', '0', '1280x800x24', '-ac', '-dpi', 'Xvfb', display, '-screen', '0', '1280x800x24', '-ac', '-dpi',
'96' '96', '-maxclients', '512'
], ],
stdout=self._xvfb_stdout, stdout=self._xvfb_stdout,
stderr=self._xvfb_stderr, stderr=self._xvfb_stderr,
......
...@@ -151,7 +151,7 @@ class LinuxPortTest(port_testcase.PortTestCase, LoggingTestCase): ...@@ -151,7 +151,7 @@ class LinuxPortTest(port_testcase.PortTestCase, LoggingTestCase):
['xdpyinfo', '-display', ':99'], ['xdpyinfo', '-display', ':99'],
[ [
'Xvfb', ':99', '-screen', '0', '1280x800x24', '-ac', '-dpi', 'Xvfb', ':99', '-screen', '0', '1280x800x24', '-ac', '-dpi',
'96' '96', '-maxclients', '512'
], ],
['xdpyinfo'], ['xdpyinfo'],
]) ])
...@@ -173,7 +173,7 @@ class LinuxPortTest(port_testcase.PortTestCase, LoggingTestCase): ...@@ -173,7 +173,7 @@ class LinuxPortTest(port_testcase.PortTestCase, LoggingTestCase):
['xdpyinfo', '-display', ':99'], ['xdpyinfo', '-display', ':99'],
[ [
'Xvfb', ':99', '-screen', '0', '1280x800x24', '-ac', '-dpi', 'Xvfb', ':99', '-screen', '0', '1280x800x24', '-ac', '-dpi',
'96' '96', '-maxclients', '512'
], ],
['xdpyinfo'], ['xdpyinfo'],
]) ])
...@@ -203,7 +203,7 @@ class LinuxPortTest(port_testcase.PortTestCase, LoggingTestCase): ...@@ -203,7 +203,7 @@ class LinuxPortTest(port_testcase.PortTestCase, LoggingTestCase):
['xdpyinfo', '-display', ':102'], ['xdpyinfo', '-display', ':102'],
[ [
'Xvfb', ':102', '-screen', '0', '1280x800x24', '-ac', 'Xvfb', ':102', '-screen', '0', '1280x800x24', '-ac',
'-dpi', '96' '-dpi', '96', '-maxclients', '512'
], ],
['xdpyinfo'], ['xdpyinfo'],
]) ])
...@@ -231,7 +231,7 @@ class LinuxPortTest(port_testcase.PortTestCase, LoggingTestCase): ...@@ -231,7 +231,7 @@ class LinuxPortTest(port_testcase.PortTestCase, LoggingTestCase):
['xdpyinfo', '-display', ':99'], ['xdpyinfo', '-display', ':99'],
[ [
'Xvfb', ':99', '-screen', '0', '1280x800x24', '-ac', '-dpi', 'Xvfb', ':99', '-screen', '0', '1280x800x24', '-ac', '-dpi',
'96' '96', '-maxclients', '512'
], ],
['xdpyinfo'], ['xdpyinfo'],
['xdpyinfo'], ['xdpyinfo'],
...@@ -257,7 +257,7 @@ class LinuxPortTest(port_testcase.PortTestCase, LoggingTestCase): ...@@ -257,7 +257,7 @@ class LinuxPortTest(port_testcase.PortTestCase, LoggingTestCase):
['xdpyinfo', '-display', ':99'], ['xdpyinfo', '-display', ':99'],
[ [
'Xvfb', ':99', '-screen', '0', '1280x800x24', '-ac', '-dpi', 'Xvfb', ':99', '-screen', '0', '1280x800x24', '-ac', '-dpi',
'96' '96', '-maxclients', '512'
], ],
] + [['xdpyinfo']] * 51) ] + [['xdpyinfo']] * 51)
env = port.setup_environ_for_server() env = port.setup_environ_for_server()
...@@ -286,10 +286,12 @@ class LinuxPortTest(port_testcase.PortTestCase, LoggingTestCase): ...@@ -286,10 +286,12 @@ class LinuxPortTest(port_testcase.PortTestCase, LoggingTestCase):
self.set_logging_level(logging.DEBUG) self.set_logging_level(logging.DEBUG)
self.assertEqual(port.setup_test_run(), SYS_DEPS_EXIT_STATUS) self.assertEqual(port.setup_test_run(), SYS_DEPS_EXIT_STATUS)
self.assertEqual(port.host.executive.calls, [[ self.assertEqual(port.host.executive.calls,
'xdpyinfo', '-display', ':99' [['xdpyinfo', '-display', ':99'],
], ['Xvfb', ':99', '-screen', '0', '1280x800x24', '-ac', '-dpi', '96'] [
]) 'Xvfb', ':99', '-screen', '0', '1280x800x24',
'-ac', '-dpi', '96', '-maxclients', '512'
]])
self.assertLog([ self.assertLog([
'DEBUG: Starting Xvfb with display ":99".\n', 'DEBUG: Starting Xvfb with display ":99".\n',
'CRITICAL: Failed to start Xvfb on display ":99" (xvfb retcode: 3).\n' 'CRITICAL: Failed to start Xvfb on display ":99" (xvfb retcode: 3).\n'
......
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