Title: [201263] trunk/Tools
Revision
201263
Author
[email protected]
Date
2016-05-22 15:55:23 -0700 (Sun, 22 May 2016)

Log Message

RELEASE_ASSERT(TestController::singleton().isCurrentInvocation(testInvocation)) is sometimes hit when running tests
https://bugs.webkit.org/show_bug.cgi?id=157977
rdar://problem/20874156

Reviewed by David Kilzer.

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::invoke): Be more certain to launch a new process when there was
a timeout detected. If we don't, there is a chance that the process is not quite frozen,
and will still send a response that we no longer expect.
(WTR::TestInvocation::dumpWebProcessUnresponsiveness): Print timeout details to stderr
too, as stdout is not available, at least not in the case that I was observing.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (201262 => 201263)


--- trunk/Tools/ChangeLog	2016-05-22 22:36:16 UTC (rev 201262)
+++ trunk/Tools/ChangeLog	2016-05-22 22:55:23 UTC (rev 201263)
@@ -1,3 +1,18 @@
+2016-05-22  Alexey Proskuryakov  <[email protected]>
+
+        RELEASE_ASSERT(TestController::singleton().isCurrentInvocation(testInvocation)) is sometimes hit when running tests
+        https://bugs.webkit.org/show_bug.cgi?id=157977
+        rdar://problem/20874156
+
+        Reviewed by David Kilzer.
+
+        * WebKitTestRunner/TestInvocation.cpp:
+        (WTR::TestInvocation::invoke): Be more certain to launch a new process when there was
+        a timeout detected. If we don't, there is a chance that the process is not quite frozen,
+        and will still send a response that we no longer expect.
+        (WTR::TestInvocation::dumpWebProcessUnresponsiveness): Print timeout details to stderr
+        too, as stdout is not available, at least not in the case that I was observing.
+
 2016-05-22  Brady Eidson  <[email protected]>
 
         Move to C++14.

Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (201262 => 201263)


--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp	2016-05-22 22:36:16 UTC (rev 201262)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp	2016-05-22 22:55:23 UTC (rev 201263)
@@ -172,13 +172,15 @@
 
     if (m_webProcessIsUnresponsive)
         dumpWebProcessUnresponsiveness();
-    else if (!TestController::singleton().resetStateToConsistentValues(m_options)) {
-        // The process froze while loading about:blank, let's start a fresh one.
-        // It would be nice to report that the previous test froze after dumping results, but we have no way to do that.
-        TestController::singleton().terminateWebContentProcess();
-        // Make sure that we have a process, as invoke() will need one to send bundle messages for the next test.
-        TestController::singleton().reattachPageToWebProcess();
-    }
+    else if (TestController::singleton().resetStateToConsistentValues(m_options))
+        return;
+    else
+        dumpWebProcessUnresponsiveness("TestController::resetStateToConsistentValues failed\n");
+
+    // The process is unresponsive, so let's start a new one.
+    TestController::singleton().terminateWebContentProcess();
+    // Make sure that we have a process, as invoke() will need one to send bundle messages for the next test.
+    TestController::singleton().reattachPageToWebProcess();
 }
 
 void TestInvocation::dumpWebProcessUnresponsiveness()
@@ -188,6 +190,7 @@
 
 void TestInvocation::dumpWebProcessUnresponsiveness(const char* errorMessage)
 {
+    fprintf(stderr, "%s", errorMessage);
     char errorMessageToStderr[1024];
 #if PLATFORM(COCOA)
     pid_t pid = WKPageGetProcessIdentifier(TestController::singleton().mainWebView()->page());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to