Title: [121061] trunk/Tools
- Revision
- 121061
- Author
- [email protected]
- Date
- 2012-06-22 15:25:50 -0700 (Fri, 22 Jun 2012)
Log Message
run_webkit_tests.py failed with AttributeError(''NoneType' object has no attribute 'pid'')
https://bugs.webkit.org/show_bug.cgi?id=89734
Reviewed by Ryosuke Niwa.
Fix a crash in ServerProcess if you called .pid() after it
crashed during a write(). We had a test for this case but the
test wasn't calling pid(), just has_crashed(). Fixed the problem
and the test.
* Scripts/webkitpy/layout_tests/port/server_process.py:
(ServerProcess.__init__):
(ServerProcess.pid):
(ServerProcess._start):
(ServerProcess.stop):
* Scripts/webkitpy/layout_tests/port/server_process_unittest.py:
(FakeServerProcess._start):
(TestServerProcess.test_broken_pipe):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (121060 => 121061)
--- trunk/Tools/ChangeLog 2012-06-22 22:24:04 UTC (rev 121060)
+++ trunk/Tools/ChangeLog 2012-06-22 22:25:50 UTC (rev 121061)
@@ -1,3 +1,24 @@
+2012-06-22 Dirk Pranke <[email protected]>
+
+ run_webkit_tests.py failed with AttributeError(''NoneType' object has no attribute 'pid'')
+ https://bugs.webkit.org/show_bug.cgi?id=89734
+
+ Reviewed by Ryosuke Niwa.
+
+ Fix a crash in ServerProcess if you called .pid() after it
+ crashed during a write(). We had a test for this case but the
+ test wasn't calling pid(), just has_crashed(). Fixed the problem
+ and the test.
+
+ * Scripts/webkitpy/layout_tests/port/server_process.py:
+ (ServerProcess.__init__):
+ (ServerProcess.pid):
+ (ServerProcess._start):
+ (ServerProcess.stop):
+ * Scripts/webkitpy/layout_tests/port/server_process_unittest.py:
+ (FakeServerProcess._start):
+ (TestServerProcess.test_broken_pipe):
+
2012-06-22 Peter Beverloo <[email protected]>
[Chromium] Disable c++0x compatibility warnings in _javascript_Core.gyp when building for Android
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/server_process.py (121060 => 121061)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/server_process.py 2012-06-22 22:24:04 UTC (rev 121060)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/server_process.py 2012-06-22 22:25:50 UTC (rev 121061)
@@ -67,6 +67,7 @@
self._cmd = cmd
self._env = env
self._host = self._port.host
+ self._pid = None
self._reset()
# See comment in imports for why we need the win32 APIs and can't just use select.
@@ -77,7 +78,7 @@
return self._name
def pid(self):
- return self._proc.pid
+ return self._pid
def _reset(self):
self._proc = None
@@ -100,6 +101,7 @@
stderr=subprocess.PIPE,
close_fds=close_fds,
env=self._env)
+ self._pid = self._proc.pid
fd = self._proc.stdout.fileno()
if not self._use_win32_apis:
fl = fcntl.fcntl(fd, fcntl.F_GETFL)
@@ -301,7 +303,6 @@
if self.poll() is None:
self._port.check_for_leaks(self.name(), self.pid())
- pid = self._proc.pid
self._proc.stdin.close()
self._proc.stdout.close()
if self._proc.stderr:
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/server_process_unittest.py (121060 => 121061)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/server_process_unittest.py 2012-06-22 22:24:04 UTC (rev 121060)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/server_process_unittest.py 2012-06-22 22:25:50 UTC (rev 121061)
@@ -79,6 +79,7 @@
def _start(self):
self._proc = MockProc(self)
self.stdin = self._proc.stdin
+ self._pid = self._proc.pid
self.broken_pipes = []
@@ -119,6 +120,7 @@
server_process = FakeServerProcess(port_obj=port_obj, name="test", cmd=["test"])
server_process.write("should break")
self.assertTrue(server_process.has_crashed())
+ self.assertNotEquals(server_process.pid(), None)
self.assertEquals(server_process._proc, None)
self.assertEquals(server_process.broken_pipes, [server_process.stdin])
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes