Title: [235646] trunk/Tools
- Revision
- 235646
- Author
- [email protected]
- Date
- 2018-09-04 16:45:06 -0700 (Tue, 04 Sep 2018)
Log Message
REGRESSION(r235408): GTK bots exiting early
https://bugs.webkit.org/show_bug.cgi?id=189063
Reviewed by Michael Catanzaro.
WebKitTestRunner was running the world leak checks even when run without --world-leaks,
causing GTK bot timeouts. So guard updateLiveDocumentsAfterTest(), checkForWorldLeaks()
and findAndDumpWorldLeaks() with m_checkForWorldLeaks checks, and in
TestController::handleControlCommand() print a message if the control script sends the
"#CHECK FOR WORLD LEAKS" command if WTR was not run with --world-leaks.
I tested that running with --world-leaks still works.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::updateLiveDocumentsAfterTest):
(WTR::TestController::checkForWorldLeaks):
(WTR::TestController::findAndDumpWorldLeaks):
(WTR::TestController::handleControlCommand):
(WTR::TestController::run):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (235645 => 235646)
--- trunk/Tools/ChangeLog 2018-09-04 23:13:55 UTC (rev 235645)
+++ trunk/Tools/ChangeLog 2018-09-04 23:45:06 UTC (rev 235646)
@@ -1,3 +1,26 @@
+2018-09-04 Simon Fraser <[email protected]>
+
+ REGRESSION(r235408): GTK bots exiting early
+ https://bugs.webkit.org/show_bug.cgi?id=189063
+
+ Reviewed by Michael Catanzaro.
+
+ WebKitTestRunner was running the world leak checks even when run without --world-leaks,
+ causing GTK bot timeouts. So guard updateLiveDocumentsAfterTest(), checkForWorldLeaks()
+ and findAndDumpWorldLeaks() with m_checkForWorldLeaks checks, and in
+ TestController::handleControlCommand() print a message if the control script sends the
+ "#CHECK FOR WORLD LEAKS" command if WTR was not run with --world-leaks.
+
+ I tested that running with --world-leaks still works.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetStateToConsistentValues):
+ (WTR::TestController::updateLiveDocumentsAfterTest):
+ (WTR::TestController::checkForWorldLeaks):
+ (WTR::TestController::findAndDumpWorldLeaks):
+ (WTR::TestController::handleControlCommand):
+ (WTR::TestController::run):
+
2018-09-04 Myles C. Maxfield <[email protected]>
Unreviewed follow-up to r235635
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (235645 => 235646)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2018-09-04 23:13:55 UTC (rev 235645)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2018-09-04 23:45:06 UTC (rev 235646)
@@ -933,7 +933,7 @@
if (!m_doneResetting)
return false;
- if (resetStage == ResetStage::AfterTest && m_checkForWorldLeaks)
+ if (resetStage == ResetStage::AfterTest)
updateLiveDocumentsAfterTest();
return m_doneResetting;
@@ -941,6 +941,9 @@
void TestController::updateLiveDocumentsAfterTest()
{
+ if (!m_checkForWorldLeaks)
+ return;
+
AsyncTask([]() {
// After each test, we update the list of live documents so that we can detect when an abandoned document first showed up.
WKRetainPtr<WKStringRef> messageName = adoptWK(WKStringCreateWithUTF8CString("GetLiveDocuments"));
@@ -950,7 +953,7 @@
void TestController::checkForWorldLeaks()
{
- if (!TestController::singleton().mainWebView())
+ if (!m_checkForWorldLeaks || !TestController::singleton().mainWebView())
return;
AsyncTask([]() {
@@ -962,6 +965,9 @@
void TestController::findAndDumpWorldLeaks()
{
+ if (!m_checkForWorldLeaks)
+ return;
+
checkForWorldLeaks();
StringBuilder builder;
@@ -1390,6 +1396,10 @@
bool TestController::handleControlCommand(const char* command)
{
if (!strcmp("#CHECK FOR WORLD LEAKS", command)) {
+ if (!m_checkForWorldLeaks) {
+ WTFLogAlways("WebKitTestRunner asked to check for world leaks, but was not run with --world-leaks");
+ return true;
+ }
findAndDumpWorldLeaks();
return true;
}
@@ -1424,7 +1434,8 @@
if (!runTest(m_paths[i].c_str()))
break;
}
- findAndDumpWorldLeaks();
+ if (m_checkForWorldLeaks)
+ findAndDumpWorldLeaks();
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes