Title: [282870] trunk/Tools
Revision
282870
Author
carlo...@webkit.org
Date
2021-09-22 04:28:59 -0700 (Wed, 22 Sep 2021)

Log Message

REGRESSION(r282082): [GTK] Tests timeout when using xvfb after r282082
https://bugs.webkit.org/show_bug.cgi?id=230610

Reviewed by Philippe Normand.

r282082 changed the way xvfb is spawned by providing a PIPE for stdout and stderr instead of redirecting to
/dev/null. The problem is that stderr is only read in case of execution failure, so when nothing fails we end up
filling the buffer that is never read. We can try to find a better solution to show the stderr output in error
messages, but for now we can revert that part to redirect stderr to /dev/null to make the tests work again.

* Scripts/webkitpy/port/xvfbdriver.py:
(XvfbDriver._xvfb_run):
(XvfbDriver._xvfb_check_if_ready):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (282869 => 282870)


--- trunk/Tools/ChangeLog	2021-09-22 09:11:06 UTC (rev 282869)
+++ trunk/Tools/ChangeLog	2021-09-22 11:28:59 UTC (rev 282870)
@@ -1,3 +1,19 @@
+2021-09-22  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        REGRESSION(r282082): [GTK] Tests timeout when using xvfb after r282082
+        https://bugs.webkit.org/show_bug.cgi?id=230610
+
+        Reviewed by Philippe Normand.
+
+        r282082 changed the way xvfb is spawned by providing a PIPE for stdout and stderr instead of redirecting to
+        /dev/null. The problem is that stderr is only read in case of execution failure, so when nothing fails we end up
+        filling the buffer that is never read. We can try to find a better solution to show the stderr output in error
+        messages, but for now we can revert that part to redirect stderr to /dev/null to make the tests work again.
+
+        * Scripts/webkitpy/port/xvfbdriver.py:
+        (XvfbDriver._xvfb_run):
+        (XvfbDriver._xvfb_check_if_ready):
+
 2021-09-21  Chris Dumez  <cdu...@apple.com>
 
         Drop makeRefPtr() and use RefPtr { } directly instead

Modified: trunk/Tools/Scripts/webkitpy/port/xvfbdriver.py (282869 => 282870)


--- trunk/Tools/Scripts/webkitpy/port/xvfbdriver.py	2021-09-22 09:11:06 UTC (rev 282869)
+++ trunk/Tools/Scripts/webkitpy/port/xvfbdriver.py	2021-09-22 11:28:59 UTC (rev 282870)
@@ -106,7 +106,8 @@
                     '%sx%s' % (self._xvfb_screen_size(), self._xvfb_screen_depth())]
         if self._port._should_use_jhbuild():
             run_xvfb = self._port._jhbuild_wrapper + run_xvfb
-        self._xvfb_process = self._port.host.executive.popen(run_xvfb, stdout=self._port.host.executive.PIPE, stderr=self._port.host.executive.PIPE, env=environment, close_fds=False)
+        with open(os.devnull, 'w') as devnull:
+            self._xvfb_process = self._port.host.executive.popen(run_xvfb, stderr=devnull, env=environment, close_fds=False)
         display_id = self._xvfb_read_display_id(read_fd)
         self._xvfb_close_pipe((read_fd, write_fd))
         return display_id
@@ -161,8 +162,7 @@
                     query_failed = True
             if timeout_expired or query_failed:
                 if self._xvfb_process.poll():
-                    xvfb_stdout, xvfb_stderr = self._xvfb_process.communicate()
-                    _log.error('The Xvfb display server has exited unexpectedly with a return code of %s. stdout is "%s" and stderr is "%s"' % (self._xvfb_process.poll(), xvfb_stdout, xvfb_stderr))
+                    _log.error('The Xvfb display server has exited unexpectedly with a return code of %s' % (self._xvfb_process.poll()))
                     break
             if waited_seconds_for_xvfb_ready > 5:
                 _log.error('Timeout reached meanwhile waiting for the Xvfb display server to be ready')
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to