Title: [126418] trunk/Tools
- Revision
- 126418
- Author
- [email protected]
- Date
- 2012-08-23 04:50:24 -0700 (Thu, 23 Aug 2012)
Log Message
[nrwt, WTR] Remove workaround for timeout handing from r126062
https://bugs.webkit.org/show_bug.cgi?id=94609
Reviewed by Dirk Pranke.
Don't try to reset state if a timeout occured but inform
the harness that the web process is no longer reliable.
* Scripts/webkitpy/layout_tests/port/driver.py:
(Driver.run_test): Remove the workaround. Furthermore, handle the case when
the pid is unknown.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::run):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::invoke):
(WTR::TestInvocation::dumpWebProcessUnresponsiveness):
* WebKitTestRunner/TestInvocation.h:
(TestInvocation):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (126417 => 126418)
--- trunk/Tools/ChangeLog 2012-08-23 11:34:42 UTC (rev 126417)
+++ trunk/Tools/ChangeLog 2012-08-23 11:50:24 UTC (rev 126418)
@@ -1,3 +1,24 @@
+2012-08-23 Balazs Kelemen <[email protected]>
+
+ [nrwt, WTR] Remove workaround for timeout handing from r126062
+ https://bugs.webkit.org/show_bug.cgi?id=94609
+
+ Reviewed by Dirk Pranke.
+
+ Don't try to reset state if a timeout occured but inform
+ the harness that the web process is no longer reliable.
+
+ * Scripts/webkitpy/layout_tests/port/driver.py:
+ (Driver.run_test): Remove the workaround. Furthermore, handle the case when
+ the pid is unknown.
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::run):
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::invoke):
+ (WTR::TestInvocation::dumpWebProcessUnresponsiveness):
+ * WebKitTestRunner/TestInvocation.h:
+ (TestInvocation):
+
2012-08-23 Ádám Kallai <[email protected]>
Unreviewed. Adding myself to committers list.
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/driver.py (126417 => 126418)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/driver.py 2012-08-23 11:34:42 UTC (rev 126417)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/driver.py 2012-08-23 11:50:24 UTC (rev 126418)
@@ -160,14 +160,6 @@
crashed = self.has_crashed()
timed_out = self._server_process.timed_out
- if text and ('Timed out waiting for final message from web process' in text):
- # FIXME: This is a hack to work around the issues in https://bugs.webkit.org/show_bug.cgi?id=94505.
- # We need to either fix the underlying problem in WTR or return a more canonical error.
- if not timed_out:
- _log.warning("webprocess timed out but WTR didn't, killing WTR")
- timed_out = True
- else:
- _log.warning("webprocess timed out and so did WTR")
if stop_when_done or crashed or timed_out:
# We call stop() even if we crashed or timed out in order to get any remaining stdout/stderr output.
@@ -183,7 +175,8 @@
# If we don't find a crash log use a placeholder error message instead.
if not crash_log:
- crash_log = 'no crash log found for %s:%d.' % (self._crashed_process_name, self._crashed_pid)
+ pid_str = str(self._crashed_pid) if self._crashed_pid else "unknown pid"
+ crash_log = 'no crash log found for %s:%s.' % (self._crashed_process_name, pid_str)
# If we were unresponsive append a message informing there may not have been a crash.
if self._subprocess_was_unresponsive:
crash_log += ' Process failed to become responsive before timing out.'
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (126417 => 126418)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2012-08-23 11:34:42 UTC (rev 126417)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2012-08-23 11:50:24 UTC (rev 126418)
@@ -625,8 +625,10 @@
void TestController::run()
{
- bool resetDone = resetStateToConsistentValues();
- ASSERT_UNUSED(resetDone, resetDone);
+ if (!resetStateToConsistentValues()) {
+ TestInvocation::dumpWebProcessUnresponsiveness("Failed to reset to consistent state before the first test");
+ return;
+ }
if (m_usingServerMode)
runTestingServerLoop();
Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (126417 => 126418)
--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp 2012-08-23 11:34:42 UTC (rev 126417)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp 2012-08-23 11:50:24 UTC (rev 126418)
@@ -198,32 +198,30 @@
WKInspectorClose(WKPageGetInspector(TestController::shared().mainWebView()->page()));
#endif // ENABLE(INSPECTOR)
- bool resetDone = TestController::shared().resetStateToConsistentValues();
- // We expect resetting to not fail if there was no error or timeout.
- ASSERT(resetDone || errorMessage);
+ if (errorMessage || !TestController::shared().resetStateToConsistentValues())
+ dumpWebProcessUnresponsiveness(errorMessage);
+}
+void TestInvocation::dumpWebProcessUnresponsiveness(const char* textToStdout)
+{
const char* errorMessageToStderr = 0;
#if PLATFORM(MAC)
char buffer[64];
- if (!resetDone) {
- pid_t pid = WKPageGetProcessIdentifier(TestController::shared().mainWebView()->page());
- sprintf(buffer, "#PROCESS UNRESPONSIVE - WebProcess (pid %ld)\n", static_cast<long>(pid));
- errorMessageToStderr = buffer;
- }
+ pid_t pid = WKPageGetProcessIdentifier(TestController::shared().mainWebView()->page());
+ sprintf(buffer, "#PROCESS UNRESPONSIVE - WebProcess (pid %ld)\n", static_cast<long>(pid));
+ errorMessageToStderr = buffer;
#else
- if (!resetDone)
- errorMessageToStderr = "#PROCESS UNRESPONSIVE - WebProcess";
+ errorMessageToStderr = "#PROCESS UNRESPONSIVE - WebProcess";
#endif
- if (errorMessage)
- dump(errorMessage, errorMessageToStderr, true);
+ dump(textToStdout, errorMessageToStderr, true);
}
void TestInvocation::dump(const char* textToStdout, const char* textToStderr, bool seenError)
{
printf("Content-Type: text/plain\n");
- printf("%s", textToStdout);
-
+ if (textToStdout)
+ fputs(textToStdout, stdout);
if (textToStderr)
fputs(textToStderr, stderr);
Modified: trunk/Tools/WebKitTestRunner/TestInvocation.h (126417 => 126418)
--- trunk/Tools/WebKitTestRunner/TestInvocation.h 2012-08-23 11:34:42 UTC (rev 126417)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.h 2012-08-23 11:50:24 UTC (rev 126418)
@@ -44,6 +44,7 @@
void didReceiveMessageFromInjectedBundle(WKStringRef messageName, WKTypeRef messageBody);
WKRetainPtr<WKTypeRef> didReceiveSynchronousMessageFromInjectedBundle(WKStringRef messageName, WKTypeRef messageBody);
+ static void dumpWebProcessUnresponsiveness(const char* textToStdout);
private:
static void dump(const char* textToStdout, const char* textToStderr = 0, bool seenError = false);
void dumpPixelsAndCompareWithExpected(WKImageRef, WKArrayRef repaintRects);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes