Changeset 206596 in webkit
- Timestamp:
- Sep 29, 2016, 11:44:54 AM (10 years ago)
- Location:
- trunk/Tools
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
WebKitTestRunner/TestController.cpp (modified) (3 diffs)
-
WebKitTestRunner/TestController.h (modified) (1 diff)
-
WebKitTestRunner/TestInvocation.cpp (modified) (3 diffs)
-
WebKitTestRunner/TestInvocation.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r206593 r206596 1 2016-09-29 Alexey Proskuryakov <ap@apple.com> 2 3 Make WKTR short timeout dynamic 4 https://bugs.webkit.org/show_bug.cgi?id=162733 5 6 Reviewed by Alex Christensen. 7 8 WebKitTestRunner has a hardcoded value for how long to wait for IPC responses, 9 which is 5 seconds, or 10 seconds under ASan. But some of the operations can be 10 fairly time consuming - e.g. launching Networking process on demand. 11 These may take longer under load, especially with GuardMalloc. 12 13 * WebKitTestRunner/TestController.cpp: 14 (WTR::TestController::resetStateToConsistentValues): 15 (WTR::TestController::reattachPageToWebProcess): 16 * WebKitTestRunner/TestController.h: 17 * WebKitTestRunner/TestInvocation.cpp: 18 (WTR::TestInvocation::shortTimeout): 19 (WTR::TestInvocation::invoke): 20 (WTR::TestInvocation::dumpResults): 21 22 * WebKitTestRunner/TestInvocation.h: 23 (WTR::TestInvocation::customTimeout): Deleted, this function was unused. 24 1 25 2016-09-29 Alex Christensen <achristensen@webkit.org> 2 26 -
trunk/Tools/WebKitTestRunner/TestController.cpp
r206449 r206596 90 90 const unsigned TestController::w3cSVGViewHeight = 360; 91 91 92 #if ASAN_ENABLED 93 const double TestController::shortTimeout = 10.0; 94 #else 95 const double TestController::shortTimeout = 5.0; 96 #endif 92 const double TestController::defaultShortTimeout = 5.0; 97 93 98 94 const double TestController::noTimeout = -1; … … 798 794 799 795 WKPageLoadURL(m_mainWebView->page(), blankURL()); 800 runUntil(m_doneResetting, shortTimeout);796 runUntil(m_doneResetting, m_currentInvocation->shortTimeout()); 801 797 return m_doneResetting; 802 798 } … … 812 808 m_doneResetting = false; 813 809 WKPageLoadURL(m_mainWebView->page(), blankURL()); 814 runUntil(m_doneResetting, shortTimeout);810 runUntil(m_doneResetting, m_currentInvocation->shortTimeout()); 815 811 } 816 812 -
trunk/Tools/WebKitTestRunner/TestController.h
r204253 r206596 58 58 static const unsigned w3cSVGViewHeight; 59 59 60 static const double shortTimeout;60 static const double defaultShortTimeout; 61 61 static const double noTimeout; 62 62 -
trunk/Tools/WebKitTestRunner/TestInvocation.cpp
r204877 r206596 99 99 } 100 100 101 double TestInvocation::shortTimeout() const 102 { 103 if (!m_timeout) { 104 // Running WKTR directly, without webkitpy. 105 return TestController::defaultShortTimeout; 106 } 107 108 // This is not exactly correct for the way short timeout is used - it should not depend on whether a test is "slow", 109 // but it currently does. There is no way to know what a normal test's timeout is, as webkitpy only passes timeouts 110 // for each test individually. 111 // But there shouldn't be any observable negative consequences from this. 112 return m_timeout / 1000. / 2; 113 } 114 101 115 bool TestInvocation::shouldLogFrameLoadDelegates() const 102 116 { … … 150 164 bool shouldOpenExternalURLs = false; 151 165 152 TestController::singleton().runUntil(m_gotInitialResponse, TestController::shortTimeout);166 TestController::singleton().runUntil(m_gotInitialResponse, shortTimeout()); 153 167 if (!m_gotInitialResponse) { 154 168 m_errorMessage = "Timed out waiting for initial response from web process\n"; … … 254 268 m_gotRepaint = false; 255 269 WKPageForceRepaint(TestController::singleton().mainWebView()->page(), this, TestInvocation::forceRepaintDoneCallback); 256 TestController::singleton().runUntil(m_gotRepaint, TestController::shortTimeout);270 TestController::singleton().runUntil(m_gotRepaint, shortTimeout()); 257 271 if (!m_gotRepaint) { 258 272 m_errorMessage = "Timed out waiting for pre-pixel dump repaint\n"; -
trunk/Tools/WebKitTestRunner/TestInvocation.h
r204877 r206596 50 50 void setIsPixelTest(const std::string& expectedPixelHash); 51 51 52 // Milliseconds 52 53 void setCustomTimeout(int duration) { m_timeout = duration; } 53 int customTimeout() const { return m_timeout; } 54 55 // Seconds 56 double shortTimeout() const; 54 57 55 58 void invoke();
Note:
See TracChangeset
for help on using the changeset viewer.