- Revision
- 177471
- Author
- a...@apple.com
- Date
- 2014-12-17 15:57:06 -0800 (Wed, 17 Dec 2014)
Log Message
REGRESSION (r177363): Gtk and Efl testing is broken
https://bugs.webkit.org/show_bug.cgi?id=139734
Reviewed by Simon Fraser.
* Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
(SingleTestRunner.__init__): Remove timeout adjustment from here, because it
affected both script and tool timeout. This is still the right place for this logic,
but it would be a larger refactoring than I can do right now.
* Scripts/webkitpy/port/base.py:
(Port.supports_per_test_timeout): Added a FIXME.
(Port.default_timeout_ms): Now that the effective timeout is longer, change this
to avoid making tests take more time.
* Scripts/webkitpy/port/driver.py:
(Driver.run_test): Adjust script timeout here.
(Driver._check_for_driver_timeout): Fix the timeout detection.
(Driver._read_block): Actually use the timeout detection code.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::beginTesting):
Use TestRunner default timeout when there isn't a timeout passed from command line for the test.
* Scripts/webkitpy/port/port_testcase.py: (PortTestCase.test_default_timeout_ms):
Update results for the new default.
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.test_hung_thread): Restore a test that I previously deleted, it was
actually a good one.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (177470 => 177471)
--- trunk/Tools/ChangeLog 2014-12-17 23:45:14 UTC (rev 177470)
+++ trunk/Tools/ChangeLog 2014-12-17 23:57:06 UTC (rev 177471)
@@ -1,3 +1,35 @@
+2014-12-17 Alexey Proskuryakov <a...@apple.com>
+
+ REGRESSION (r177363): Gtk and Efl testing is broken
+ https://bugs.webkit.org/show_bug.cgi?id=139734
+
+ Reviewed by Simon Fraser.
+
+ * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
+ (SingleTestRunner.__init__): Remove timeout adjustment from here, because it
+ affected both script and tool timeout. This is still the right place for this logic,
+ but it would be a larger refactoring than I can do right now.
+
+ * Scripts/webkitpy/port/base.py:
+ (Port.supports_per_test_timeout): Added a FIXME.
+ (Port.default_timeout_ms): Now that the effective timeout is longer, change this
+ to avoid making tests take more time.
+
+ * Scripts/webkitpy/port/driver.py:
+ (Driver.run_test): Adjust script timeout here.
+ (Driver._check_for_driver_timeout): Fix the timeout detection.
+ (Driver._read_block): Actually use the timeout detection code.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::beginTesting):
+ Use TestRunner default timeout when there isn't a timeout passed from command line for the test.
+
+ * Scripts/webkitpy/port/port_testcase.py: (PortTestCase.test_default_timeout_ms):
+ Update results for the new default.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (RunTest.test_hung_thread): Restore a test that I previously deleted, it was
+ actually a good one.
+
2014-12-17 Commit Queue <commit-qu...@webkit.org>
Unreviewed, rolling out r177456.
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py (177470 => 177471)
--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py 2014-12-17 23:45:14 UTC (rev 177470)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py 2014-12-17 23:57:06 UTC (rev 177471)
@@ -60,13 +60,7 @@
self._should_run_pixel_test = test_input.should_run_pixel_test
self._reference_files = test_input.reference_files
self._stop_when_done = stop_when_done
-
self._timeout = test_input.timeout
- if self._timeout > 5000:
- # Timeouts are detected by both script and tool; tool detected timeouts are
- # better, because they contain partial output. Give the tool some time to
- # report the timeout instead of being killed.
- self._timeout = int(self._timeout) - 5000
if self._reference_files:
# Detect and report a test which has a wrong combination of expectation files.
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py (177470 => 177471)
--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py 2014-12-17 23:45:14 UTC (rev 177470)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py 2014-12-17 23:57:06 UTC (rev 177471)
@@ -266,6 +266,13 @@
details, _, _ = logging_run(['--full-results-html'])
self.assertEqual(details.exit_code, 0)
+ def test_hung_thread(self):
+ details, err, _ = logging_run(['--run-singly', '--time-out-ms=50', 'failures/expected/hang.html'], tests_included=True)
+ # Note that hang.html is marked as WontFix and all WontFix tests are
+ # expected to Pass, so that actually running them generates an "unexpected" error.
+ self.assertEqual(details.exit_code, 1)
+ self.assertNotEmpty(err)
+
def test_keyboard_interrupt(self):
# Note that this also tests running a test marked as SKIP if
# you specify it explicitly.
Modified: trunk/Tools/Scripts/webkitpy/port/base.py (177470 => 177471)
--- trunk/Tools/Scripts/webkitpy/port/base.py 2014-12-17 23:45:14 UTC (rev 177470)
+++ trunk/Tools/Scripts/webkitpy/port/base.py 2014-12-17 23:57:06 UTC (rev 177471)
@@ -131,6 +131,8 @@
return []
def supports_per_test_timeout(self):
+ # FIXME: Make per-test timeouts unconditional once all ports' DumpRenderTrees support that.
+ # Windows DumpRenderTree may be the only one remaining to be fixed at this time.
return False
def default_pixel_tests(self):
@@ -138,7 +140,7 @@
return False
def default_timeout_ms(self):
- return 35 * 1000
+ return 30 * 1000
def driver_stop_timeout(self):
""" Returns the amount of time in seconds to wait before killing the process in driver.stop()."""
Modified: trunk/Tools/Scripts/webkitpy/port/driver.py (177470 => 177471)
--- trunk/Tools/Scripts/webkitpy/port/driver.py 2014-12-17 23:45:14 UTC (rev 177470)
+++ trunk/Tools/Scripts/webkitpy/port/driver.py 2014-12-17 23:57:06 UTC (rev 177471)
@@ -179,8 +179,14 @@
self.err_seen_eof = False
command = self._command_from_driver_input(driver_input)
- deadline = test_begin_time + int(driver_input.timeout) / 1000.0
+ # Certain timeouts are detected by the tool itself; tool detection is better,
+ # because results contain partial output in this case. Make script timeout longer
+ # by 5 seconds to avoid racing for which timeout is detected first.
+ # FIXME: It's not the job of the driver to decide what the timeouts should be.
+ # Move the additional timeout to driver_input.
+ deadline = test_begin_time + int(driver_input.timeout) / 1000.0 + 5
+
self._server_process.write(command)
text, audio = self._read_first_block(deadline) # First block is either text or audio
image, actual_image_hash = self._read_optional_image_block(deadline) # The second (optional) block is image data.
@@ -363,7 +369,7 @@
return cmd
def _check_for_driver_timeout(self, out_line):
- if out_line == "FAIL: Timed out waiting for notifyDone to be called":
+ if out_line == "FAIL: Timed out waiting for notifyDone to be called\n":
self._driver_timed_out = True
def _check_for_driver_crash(self, error_line):
@@ -484,6 +490,7 @@
err_line, self.err_seen_eof = self._strip_eof(err_line)
if out_line:
+ self._check_for_driver_timeout(out_line)
if out_line[-1] != "\n":
_log.error("Last character read from DRT stdout line was not a newline! This indicates either a NRWT or DRT bug.")
content_length_before_header_check = block._content_length
Modified: trunk/Tools/Scripts/webkitpy/port/port_testcase.py (177470 => 177471)
--- trunk/Tools/Scripts/webkitpy/port/port_testcase.py 2014-12-17 23:45:14 UTC (rev 177470)
+++ trunk/Tools/Scripts/webkitpy/port/port_testcase.py 2014-12-17 23:57:06 UTC (rev 177471)
@@ -92,8 +92,8 @@
return port
def test_default_timeout_ms(self):
- self.assertEqual(self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 35000)
- self.assertEqual(self.make_port(options=MockOptions(configuration='Debug')).default_timeout_ms(), 35000)
+ self.assertEqual(self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 30000)
+ self.assertEqual(self.make_port(options=MockOptions(configuration='Debug')).default_timeout_ms(), 30000)
def test_default_pixel_tests(self):
self.assertEqual(self.make_port().default_pixel_tests(), False)
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp (177470 => 177471)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp 2014-12-17 23:45:14 UTC (rev 177470)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp 2014-12-17 23:57:06 UTC (rev 177471)
@@ -266,7 +266,8 @@
m_testRunner->setAcceptsEditing(true);
m_testRunner->setTabKeyCyclesThroughElements(true);
- m_testRunner->setCustomTimeout(m_timeout);
+ if (m_timeout > 0)
+ m_testRunner->setCustomTimeout(m_timeout);
page()->prepare();