Title: [126059] trunk/Tools
Revision
126059
Author
[email protected]
Date
2012-08-20 13:25:03 -0700 (Mon, 20 Aug 2012)

Log Message

NRWT reports unexpected EOF
https://bugs.webkit.org/show_bug.cgi?id=94387

Reviewed by Adam Barth.

Stop logging "Unexpected EOF" when we are reading the last few
bytes from stdout/stderr after stopping the subprocess.

* Scripts/webkitpy/layout_tests/port/server_process.py:
(ServerProcess._wait_for_data_and_update_buffers_using_select):
(ServerProcess.stop):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (126058 => 126059)


--- trunk/Tools/ChangeLog	2012-08-20 20:23:31 UTC (rev 126058)
+++ trunk/Tools/ChangeLog	2012-08-20 20:25:03 UTC (rev 126059)
@@ -1,3 +1,17 @@
+2012-08-20  Dirk Pranke  <[email protected]>
+
+        NRWT reports unexpected EOF
+        https://bugs.webkit.org/show_bug.cgi?id=94387
+
+        Reviewed by Adam Barth.
+
+        Stop logging "Unexpected EOF" when we are reading the last few
+        bytes from stdout/stderr after stopping the subprocess.
+
+        * Scripts/webkitpy/layout_tests/port/server_process.py:
+        (ServerProcess._wait_for_data_and_update_buffers_using_select):
+        (ServerProcess.stop):
+
 2012-08-20  Brady Eidson  <[email protected]>
 
         Temporarily disable the 20+ crash and 500+ failure options on WK2 bots.

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/server_process.py (126058 => 126059)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/server_process.py	2012-08-20 20:23:31 UTC (rev 126058)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/server_process.py	2012-08-20 20:25:03 UTC (rev 126059)
@@ -213,7 +213,7 @@
         output, self._error = self._split_string_after_index(self._error, bytes_count)
         return output
 
-    def _wait_for_data_and_update_buffers_using_select(self, deadline):
+    def _wait_for_data_and_update_buffers_using_select(self, deadline, stopping=False):
         out_fd = self._proc.stdout.fileno()
         err_fd = self._proc.stderr.fileno()
         select_fds = (out_fd, err_fd)
@@ -229,16 +229,22 @@
         try:
             if out_fd in read_fds:
                 data = ""
-                if not data:
-                    _log.warning('unexpected EOF of stdout')
-                    self._crashed = True
+                if not data and not stopping:
+                    if self._proc.poll() is not None:
+                        _log.warning('unexpected EOF of stdout, %s crashed' % self._name)
+                        self._crashed = True
+                    else:
+                        _log.warning('unexpected EOF of stdout, %s still alive' % self._name)
                 self._output += data
 
             if err_fd in read_fds:
                 data = ""
-                if not data:
-                    _log.warning('unexpected EOF of stderr')
-                    self._crashed = True
+                if not data and not stopping:
+                    if self._proc.poll() is not None:
+                        _log.warning('unexpected EOF on stderr, %s crashed' % self._name)
+                        self._crashed = True
+                    else:
+                        _log.warning('unexpected EOF on stderr, %s is still alive' % self._name)
                 self._error += data
         except IOError, e:
             # We can ignore the IOErrors because we will detect if the subporcess crashed
@@ -333,7 +339,7 @@
         if self._use_win32_apis:
             self._wait_for_data_and_update_buffers_using_win32_apis(now)
         else:
-            self._wait_for_data_and_update_buffers_using_select(now)
+            self._wait_for_data_and_update_buffers_using_select(now, stopping=True)
         out, err = self._output, self._error
         self._reset()
         return (out, err)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to