Changeset 262065 in webkit
- Timestamp:
- May 22, 2020 11:19:03 AM (4 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r262063 r262065 1 2020-05-22 Chris Dumez <cdumez@apple.com> 2 3 [WKTR] Make TestController::resetStateToConsistentValues() more robust against failures to navigate to about:blank 4 https://bugs.webkit.org/show_bug.cgi?id=212268 5 <rdar://problem/63493074> 6 7 Reviewed by Geoffrey Garen. 8 9 Make TestController::resetStateToConsistentValues() more robust against failures to navigate to about:blank. 10 11 In <rdar://problem/63493074>, we have evidence that TestController::resetStateToConsistentValues() sometimes 12 fails to load about:blank, likely due to an unresponsive WebProcess. When this happens, WebKitTestRunner 13 reports the test as timing out and logs this on stderr: 14 """ 15 <unknown> - TestController::run - Failed to reset state to consistent values 16 #PROCESS UNRESPONSIVE - com.apple.WebKit.WebContent.Development (pid 57421) 17 """ 18 19 This is unfortunate because this does not indicate that anything is particularly wrong with the test in 20 question. Rather, it indicates that the WebProcess is unresponsive (likely due to a hang caused by a 21 previous test), which prevents WebKitTestRunner to reset the state in order to run the test. 22 23 I propose that if we fail to load about:blank once, we log an error message to stderr but then terminate 24 the WebProcess and try once again, to make WebKitTestRunner more robust. 25 I have verified the change locally, by injecting a script in resetStateToConsistentValues() that causes 26 a WebProcess hang. Before my change, the test would time out and the same logging as in 27 <rdar://problem/63493074> would show. After my change though, the test would pass successfully despite the 28 WebProcess hang. 29 30 * WebKitTestRunner/TestController.cpp: 31 (WTR::TestController::resetStateToConsistentValues): 32 1 33 2020-05-22 ChangSeok Oh <changseok@webkit.org> 2 34 -
trunk/Tools/WebKitTestRunner/TestController.cpp
r261963 r262065 1143 1143 m_shouldDismissJavaScriptAlertsAsynchronously = false; 1144 1144 1145 auto loadAboutBlank = [this] { 1146 m_doneResetting = false; 1147 WKPageLoadURL(m_mainWebView->page(), blankURL()); 1148 runUntil(m_doneResetting, m_currentInvocation->shortTimeout()); 1149 return m_doneResetting; 1150 }; 1151 1145 1152 // Reset main page back to about:blank 1146 m_doneResetting = false; 1147 WKPageLoadURL(m_mainWebView->page(), blankURL()); 1148 runUntil(m_doneResetting, m_currentInvocation->shortTimeout()); 1149 if (!m_doneResetting) 1150 return false; 1153 if (!loadAboutBlank()) { 1154 WTFLogAlways("Failed to load 'about:blank', terminating process and trying again."); 1155 WKPageTerminate(m_mainWebView->page()); 1156 if (!loadAboutBlank()) { 1157 WTFLogAlways("Failed to load 'about:blank' again after termination."); 1158 return false; 1159 } 1160 } 1151 1161 1152 1162 if (resetStage == ResetStage::AfterTest) {
Note: See TracChangeset
for help on using the changeset viewer.