Title: [139697] trunk/Tools
- Revision
- 139697
- Author
- [email protected]
- Date
- 2013-01-14 17:40:54 -0800 (Mon, 14 Jan 2013)
Log Message
kill whole lighttpd process tree for chromium win
https://bugs.webkit.org/show_bug.cgi?id=106838
Reviewed by Tony Chang.
Land a speculative fix for lighttpd.exe hanging on some chromium bots;
I think a test is causing a httpd server child process to wedge and
killing the parent httpd server process isn't sufficient to ensure
that the children are also killed.
* Scripts/webkitpy/layout_tests/servers/http_server.py:
(Lighttpd._check_and_kill):
* Scripts/webkitpy/layout_tests/servers/http_server_unittest.py:
(TestHttpServer.test_start_cmd):
(TestHttpServer):
(TestHttpServer.test_win32_start_and_stop):
(TestHttpServer.test_win32_start_and_stop.wait_for_action):
(TestHttpServer.test_win32_start_and_stop.mock_returns):
(TestHttpServer.test_win32_start_and_stop.mock_returns.return_value_thunk):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (139696 => 139697)
--- trunk/Tools/ChangeLog 2013-01-15 01:36:32 UTC (rev 139696)
+++ trunk/Tools/ChangeLog 2013-01-15 01:40:54 UTC (rev 139697)
@@ -1,3 +1,25 @@
+2013-01-14 Dirk Pranke <[email protected]>
+
+ kill whole lighttpd process tree for chromium win
+ https://bugs.webkit.org/show_bug.cgi?id=106838
+
+ Reviewed by Tony Chang.
+
+ Land a speculative fix for lighttpd.exe hanging on some chromium bots;
+ I think a test is causing a httpd server child process to wedge and
+ killing the parent httpd server process isn't sufficient to ensure
+ that the children are also killed.
+
+ * Scripts/webkitpy/layout_tests/servers/http_server.py:
+ (Lighttpd._check_and_kill):
+ * Scripts/webkitpy/layout_tests/servers/http_server_unittest.py:
+ (TestHttpServer.test_start_cmd):
+ (TestHttpServer):
+ (TestHttpServer.test_win32_start_and_stop):
+ (TestHttpServer.test_win32_start_and_stop.wait_for_action):
+ (TestHttpServer.test_win32_start_and_stop.mock_returns):
+ (TestHttpServer.test_win32_start_and_stop.mock_returns.return_value_thunk):
+
2013-01-14 Nico Weber <[email protected]>
[chromium] Enable `update-webkit --chromium --ninja` on windows
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py (139696 => 139697)
--- trunk/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py 2013-01-15 01:36:32 UTC (rev 139696)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py 2013-01-15 01:40:54 UTC (rev 139697)
@@ -214,6 +214,15 @@
def _check_and_kill(self):
if self._executive.check_running_pid(self._pid):
- self._executive.kill_process(self._pid)
+ host = self._port_obj.host
+ if host.platform.is_win() and not host.platform.is_cygwin():
+ # FIXME: https://bugs.webkit.org/show_bug.cgi?id=106838
+ # We need to kill all of the child processes as well as the
+ # parent, so we can't use executive.kill_process().
+ #
+ # If this is actually working, we should figure out a clean API.
+ self._executive.run_command(["taskkill.exe", "/f", "/t", self._pid], error_handler=self._executive.ignore_error)
+ else:
+ self._executive.kill_process(self._pid)
return False
return True
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/servers/http_server_unittest.py (139696 => 139697)
--- trunk/Tools/Scripts/webkitpy/layout_tests/servers/http_server_unittest.py 2013-01-15 01:36:32 UTC (rev 139696)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/servers/http_server_unittest.py 2013-01-15 01:40:54 UTC (rev 139697)
@@ -26,9 +26,9 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import unittest
import re
import sys
+import unittest
from webkitpy.common.host_mock import MockHost
from webkitpy.layout_tests.port import test
@@ -62,3 +62,39 @@
'alias.url += ( "/mock/another-additional-dir" => "/mock-checkout/one-additional-dir" )',
'alias.url += ( "/media-resources" => "/test.checkout/LayoutTests/media" )',
])
+
+ def test_win32_start_and_stop(self):
+ host = MockHost()
+ test_port = test.TestPort(host)
+ host.filesystem.write_text_file(
+ "/mock-checkout/Tools/Scripts/webkitpy/layout_tests/servers/lighttpd.conf", "Mock Config\n")
+ host.filesystem.write_text_file(
+ "/usr/lib/lighttpd/liblightcomp.dylib", "Mock dylib")
+
+ host.platform.is_win = lambda: True
+ host.platform.is_cygwin = lambda: False
+
+ server = Lighttpd(test_port, "/mock/output_dir",
+ additional_dirs={
+ "/mock/one-additional-dir": "/mock-checkout/one-additional-dir",
+ "/mock/another-additional-dir": "/mock-checkout/one-additional-dir"})
+ server._is_server_running_on_all_ports = lambda: True
+
+ server.start()
+ self.assertNotEquals(host.executive.calls, [])
+
+ def wait_for_action(action):
+ if action():
+ return True
+ return action()
+
+ def mock_returns(return_values):
+ def return_value_thunk(*args, **kwargs):
+ return return_values.pop(0)
+ return return_value_thunk
+
+ host.executive.check_running_pid = mock_returns([True, False])
+ server._wait_for_action = wait_for_action
+
+ server.stop()
+ self.assertEquals(['taskkill.exe', '/f', '/t', 42], host.executive.calls[1])
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes