XvfbDriver should set up Xvfb instances providing screens of 8-bit depth
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Sep 2013 17:57:53 +0000 (17:57 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Sep 2013 17:57:53 +0000 (17:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=121951

Reviewed by Carlos Garcia Campos.

Screens with 24-bit depth are causing problems as it doesn't seem to be possible to fall back to
software rendering successfully on the GTK 64-bit release builder, resulting in crashes in almost
500 layout tests that trigger accelerated compositing to be used.

* Scripts/webkitpy/port/xvfbdriver.py:
(XvfbDriver._start):
* Scripts/webkitpy/port/xvfbdriver_unittest.py: Update unit test baselines.
(XvfbDriverTest.test_start_no_pixel_tests):
(XvfbDriverTest.test_start_pixel_tests):
(XvfbDriverTest.test_start_arbitrary_worker_number):
(XvfbDriverTest.test_next_free_display):
(XvfbDriverTest.test_start_next_worker):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156475 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/port/xvfbdriver.py
Tools/Scripts/webkitpy/port/xvfbdriver_unittest.py

index 5208ea5..7225b22 100644 (file)
@@ -1,3 +1,23 @@
+2013-09-26  Zan Dobersek  <zdobersek@igalia.com>
+
+        XvfbDriver should set up Xvfb instances providing screens of 8-bit depth
+        https://bugs.webkit.org/show_bug.cgi?id=121951
+
+        Reviewed by Carlos Garcia Campos.
+
+        Screens with 24-bit depth are causing problems as it doesn't seem to be possible to fall back to
+        software rendering successfully on the GTK 64-bit release builder, resulting in crashes in almost
+        500 layout tests that trigger accelerated compositing to be used.
+
+        * Scripts/webkitpy/port/xvfbdriver.py:
+        (XvfbDriver._start):
+        * Scripts/webkitpy/port/xvfbdriver_unittest.py: Update unit test baselines.
+        (XvfbDriverTest.test_start_no_pixel_tests):
+        (XvfbDriverTest.test_start_pixel_tests):
+        (XvfbDriverTest.test_start_arbitrary_worker_number):
+        (XvfbDriverTest.test_next_free_display):
+        (XvfbDriverTest.test_start_next_worker):
+
 2013-09-26  Tim Horton  <timothy_horton@apple.com>
 
         Tiled drawing should not imply threaded scrolling
index 9208a52..399a61f 100644 (file)
@@ -74,7 +74,7 @@ class XvfbDriver(Driver):
         display_id = self._next_free_display()
         self._lock_file = "/tmp/.X%d-lock" % display_id
 
-        run_xvfb = ["Xvfb", ":%d" % display_id, "-screen",  "0", "800x600x24", "-nolisten", "tcp"]
+        run_xvfb = ["Xvfb", ":%d" % display_id, "-screen",  "0", "800x600x8", "-nolisten", "tcp"]
         with open(os.devnull, 'w') as devnull:
             self._xvfb_process = self._port.host.executive.popen(run_xvfb, stderr=devnull)
 
index ec9f14c..3ab5d46 100644 (file)
@@ -66,24 +66,24 @@ class XvfbDriverTest(unittest.TestCase):
 
     def test_start_no_pixel_tests(self):
         driver = self.make_driver()
-        expected_logs = "MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
+        expected_logs = "MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x8', '-nolisten', 'tcp']\n"
         self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":0")
         self.cleanup_driver(driver)
 
     def test_start_pixel_tests(self):
         driver = self.make_driver()
-        expected_logs = "MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
+        expected_logs = "MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x8', '-nolisten', 'tcp']\n"
         self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":0", pixel_tests=True)
         self.cleanup_driver(driver)
 
     def test_start_arbitrary_worker_number(self):
         driver = self.make_driver(worker_number=17)
-        expected_logs = "MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
+        expected_logs = "MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x8', '-nolisten', 'tcp']\n"
         self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":0", pixel_tests=True)
         self.cleanup_driver(driver)
 
     def test_next_free_display(self):
-        output = "Xorg            /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch -background none\nXvfb            Xvfb :1 -screen 0 800x600x24 -nolisten tcp"
+        output = "Xorg            /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch -background none\nXvfb            Xvfb :1 -screen 0 800x600x8 -nolisten tcp"
         executive = MockExecutive2(output)
         driver = self.make_driver(executive=executive)
         self.assertEqual(driver._next_free_display(), 2)
@@ -93,12 +93,12 @@ class XvfbDriverTest(unittest.TestCase):
         driver = self.make_driver(executive=executive)
         self.assertEqual(driver._next_free_display(), 1)
         self.cleanup_driver(driver)
-        output = "Xvfb            Xvfb :0 -screen 0 800x600x24 -nolisten tcp"
+        output = "Xvfb            Xvfb :0 -screen 0 800x600x8 -nolisten tcp"
         executive = MockExecutive2(output)
         driver = self.make_driver(executive=executive)
         self.assertEqual(driver._next_free_display(), 1)
         self.cleanup_driver(driver)
-        output = "Xvfb            Xvfb :1 -screen 0 800x600x24 -nolisten tcp\nXvfb            Xvfb :0 -screen 0 800x600x24 -nolisten tcp\nXvfb            Xvfb :3 -screen 0 800x600x24 -nolisten tcp"
+        output = "Xvfb            Xvfb :1 -screen 0 800x600x8 -nolisten tcp\nXvfb            Xvfb :0 -screen 0 800x600x8 -nolisten tcp\nXvfb            Xvfb :3 -screen 0 800x600x8 -nolisten tcp"
         executive = MockExecutive2(output)
         driver = self.make_driver(executive=executive)
         self.assertEqual(driver._next_free_display(), 2)
@@ -107,12 +107,12 @@ class XvfbDriverTest(unittest.TestCase):
     def test_start_next_worker(self):
         driver = self.make_driver()
         driver._next_free_display = lambda: 0
-        expected_logs = "MOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
+        expected_logs = "MOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x8', '-nolisten', 'tcp']\n"
         self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":0", pixel_tests=True)
         self.cleanup_driver(driver)
         driver = self.make_driver()
         driver._next_free_display = lambda: 3
-        expected_logs = "MOCK popen: ['Xvfb', ':3', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
+        expected_logs = "MOCK popen: ['Xvfb', ':3', '-screen', '0', '800x600x8', '-nolisten', 'tcp']\n"
         self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":3", pixel_tests=True)
         self.cleanup_driver(driver)