Title: [127122] trunk/Tools
Revision
127122
Author
[email protected]
Date
2012-08-30 04:00:55 -0700 (Thu, 30 Aug 2012)

Log Message

[NRWT] Add support for recognizing arbitrary process names in crash lines
https://bugs.webkit.org/show_bug.cgi?id=95435

Reviewed by Adam Barth.

When running layout tests in the chromium port using the content shell,
we want to be able to report sub-process crashes as well.

* Scripts/webkitpy/layout_tests/port/driver.py:
(Driver._check_for_driver_crash):
* Scripts/webkitpy/layout_tests/port/driver_unittest.py:
(DriverTest.test_check_for_driver_crash):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (127121 => 127122)


--- trunk/Tools/ChangeLog	2012-08-30 10:26:19 UTC (rev 127121)
+++ trunk/Tools/ChangeLog	2012-08-30 11:00:55 UTC (rev 127122)
@@ -1,3 +1,18 @@
+2012-08-30  Jochen Eisinger  <[email protected]>
+
+        [NRWT] Add support for recognizing arbitrary process names in crash lines
+        https://bugs.webkit.org/show_bug.cgi?id=95435
+
+        Reviewed by Adam Barth.
+
+        When running layout tests in the chromium port using the content shell,
+        we want to be able to report sub-process crashes as well.
+
+        * Scripts/webkitpy/layout_tests/port/driver.py:
+        (Driver._check_for_driver_crash):
+        * Scripts/webkitpy/layout_tests/port/driver_unittest.py:
+        (DriverTest.test_check_for_driver_crash):
+
 2012-08-29  Zan Dobersek  <[email protected]>
 
         Random test-webkitpy failures on the buildbot

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/driver.py (127121 => 127122)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/driver.py	2012-08-30 10:26:19 UTC (rev 127121)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/driver.py	2012-08-30 11:00:55 UTC (rev 127122)
@@ -307,18 +307,17 @@
             # See http://trac.webkit.org/changeset/65537.
             self._crashed_process_name = self._server_process.name()
             self._crashed_pid = self._server_process.pid()
-        elif (error_line.startswith("#CRASHED - WebProcess")
-            or error_line.startswith("#PROCESS UNRESPONSIVE - WebProcess")):
+        elif (error_line.startswith("#CRASHED - ")
+            or error_line.startswith("#PROCESS UNRESPONSIVE - ")):
             # WebKitTestRunner uses this to report that the WebProcess subprocess crashed.
-            pid = None
-            m = re.search('pid (\d+)', error_line)
-            if m:
-                pid = int(m.group(1))
-            self._crashed_process_name = 'WebProcess'
+            match = re.match('#(?:CRASHED|PROCESS UNRESPONSIVE) - (\S+)', error_line)
+            self._crashed_process_name = match.group(1) if match else 'WebProcess'
+            match = re.search('pid (\d+)', error_line)
+            pid = int(match.group(1)) if match else None
             self._crashed_pid = pid
             # FIXME: delete this after we're sure this code is working :)
-            _log.debug('WebProcess crash, pid = %s, error_line = %s' % (str(pid), error_line))
-            if error_line.startswith("#PROCESS UNRESPONSIVE - WebProcess"):
+            _log.debug('%s crash, pid = %s, error_line = %s' % (self._crashed_process_name, str(pid), error_line))
+            if error_line.startswith("#PROCESS UNRESPONSIVE - "):
                 self._subprocess_was_unresponsive = True
                 # We want to show this since it's not a regular crash and probably we don't have a crash log.
                 self.error_from_test += error_line

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/driver_unittest.py (127121 => 127122)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/driver_unittest.py	2012-08-30 10:26:19 UTC (rev 127121)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/driver_unittest.py	2012-08-30 11:00:55 UTC (rev 127122)
@@ -221,6 +221,12 @@
 
         driver._crashed_process_name = None
         driver._crashed_pid = None
+        driver._server_process = FakeServerProcess(False)
+        driver._subprocess_was_unresponsive = False
+        assert_crash(driver, '#CRASHED - renderer (pid 8675)\n', True, 'renderer', 8675)
+
+        driver._crashed_process_name = None
+        driver._crashed_pid = None
         driver._server_process = FakeServerProcess(True)
         driver._subprocess_was_unresponsive = False
         assert_crash(driver, '', True, 'FakeServerProcess', 1234)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to