Bug 80042

Summary: [WK2] run-perf-tests should be able to run with WTR
Product: WebKit Reporter: Jesus Sanchez-Palencia <jesus>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, cgarcia, mrobinson, ojan, ossy, pnormand, webkit.review.bot, zan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 77037    
Attachments:
Description Flags
Patch
none
Patch none

Jesus Sanchez-Palencia
Reported 2012-03-01 12:34:08 PST
We should be able to run the performance tests with WebKitTestRunner (WebKit 2) and, therefore, WKTR should support the --no-timeout parameter.
Attachments
Patch (16.22 KB, patch)
2012-03-01 13:50 PST, Zan Dobersek
no flags
Patch (14.85 KB, patch)
2012-03-05 12:51 PST, Zan Dobersek
no flags
Zan Dobersek
Comment 1 2012-03-01 13:50:46 PST
Zan Dobersek
Comment 2 2012-03-01 13:56:15 PST
(In reply to comment #1) > Created an attachment (id=129741) [details] > Patch This patch adds a necessary option to PerfTestRunner and does some small refactoring in WebKitTestRunner to avoid timing out, as required by perf tests. I've tested these changes on Gtk port with success. I've applied the similar logic to the Qt port - it should work, but I haven't tested it. I'm unfamiliar with the ways Mac and Win ports set up the loops, so I've left a FIXME note in those places. The code should build fine, though.
Jesus Sanchez-Palencia
Comment 3 2012-03-02 09:40:35 PST
(In reply to comment #2) > I've tested these changes on Gtk port with success. I've applied the similar logic to the Qt port - it should work, but I haven't tested it. I'm testing your patch with the Qt port and it works just fine. Thanks!
Martin Robinson
Comment 4 2012-03-02 10:26:34 PST
Comment on attachment 129741 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=129741&action=review Looks fine, in general, but I have a few nits. > Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h:129 > + bool m_useTimeoutWatchdog; nit: m_useWaitToDumpWatchdogTimer? > Tools/WebKitTestRunner/TestController.cpp:546 > -void TestController::runUntil(bool& done, TimeoutDuration timeoutDuration) > +void TestController::runUntil(bool& done, TimeoutDuration timeoutDuration, bool shouldTimeout) > { > - platformRunUntil(done, timeoutDuration == ShortTimeout ? m_shortTimeout : m_longTimeout); > + platformRunUntil(done, timeoutDuration == ShortTimeout ? m_shortTimeout : m_longTimeout, shouldTimeout); Instead of adding an extra parameter, perhaps it would be better to add another value to the enum so there is ShortTimeout, LongTimeout and NoTimeout. > Tools/WebKitTestRunner/TestController.h:74 > + void platformRunUntil(bool& done, double timeout, bool shouldTimeout); Instead of adding another parameter, perhaps you could just have a constant == -1 that signifies no timeout. Another option would be to add another calld platformRun that didn't timeout. > Tools/WebKitTestRunner/TestInvocation.cpp:153 > + WKRetainPtr<WKStringRef> useTimeoutWatchdogKey = adoptWK(WKStringCreateWithUTF8CString("UseTimeoutWatchdog")); > + WKRetainPtr<WKBooleanRef> useTimeoutWatchdogValue = adoptWK(WKBooleanCreate(TestController::shared().shouldTimeout())); > + WKDictionaryAddItem(beginTestMessageBody.get(), useTimeoutWatchdogKey.get(), useTimeoutWatchdogValue.get()); Probably better to refer to this thing consistently ala useWaitToDumpWatchdogTimer. > Tools/WebKitTestRunner/mac/TestControllerMac.mm:56 > + // FIXME: No timeout should occur if shouldTimeout is false (necessary when running performance tests). It seems quite possible to add support here. > Tools/WebKitTestRunner/win/TestControllerWin.cpp:175 > + // FIXME: No timeout should occur if shouldTimeout is false (necessary when running performance tests). This one seems a bit more complicated, so if you don't add Windows support, be sure to open a bug for it and CC the appropriate people.
Zan Dobersek
Comment 5 2012-03-05 11:04:15 PST
Comment on attachment 129741 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=129741&action=review >> Tools/WebKitTestRunner/TestController.cpp:546 >> + platformRunUntil(done, timeoutDuration == ShortTimeout ? m_shortTimeout : m_longTimeout, shouldTimeout); > > Instead of adding an extra parameter, perhaps it would be better to add another value to the enum so there is ShortTimeout, LongTimeout and NoTimeout. Noted. >> Tools/WebKitTestRunner/TestController.h:74 >> + void platformRunUntil(bool& done, double timeout, bool shouldTimeout); > > Instead of adding another parameter, perhaps you could just have a constant == -1 that signifies no timeout. Another option would be to add another calld platformRun that didn't timeout. platformRun would probably introduce some code duplication, so I'll just use a negative constant to indicate no timeout and check for that. >> Tools/WebKitTestRunner/TestInvocation.cpp:153 >> + WKDictionaryAddItem(beginTestMessageBody.get(), useTimeoutWatchdogKey.get(), useTimeoutWatchdogValue.get()); > > Probably better to refer to this thing consistently ala useWaitToDumpWatchdogTimer. I'll just put (u/U)seWaitToDumpWatchdogTimer everywhere - consistency at its best. >> Tools/WebKitTestRunner/mac/TestControllerMac.mm:56 >> + // FIXME: No timeout should occur if shouldTimeout is false (necessary when running performance tests). > > It seems quite possible to add support here. I'm not familiar enough with Objective C or Cocoa to be comfortable making these changes. I can give it a shot, but I would rather open a bug for this problem, as you suggested doing for the Windows' TestController.
Zan Dobersek
Comment 6 2012-03-05 12:51:19 PST
Martin Robinson
Comment 7 2012-03-09 09:04:59 PST
Comment on attachment 130183 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=130183&action=review > Tools/WebKitTestRunner/TestController.cpp:558 > + timeout = -1.0; > + break; > + } Sorry, I should have been a bit clearer in my review comment. I think it makes sense to have a constant, perhaps a static member variable like: TestController:s_noTimeoutDuration = -1; I can change this and land it.
Martin Robinson
Comment 8 2012-03-10 10:45:12 PST
Zan Dobersek
Comment 9 2012-03-11 00:30:15 PST
(In reply to comment #8) > Committed r110382: <http://trac.webkit.org/changeset/110382> Thanks for the small changes and landing. Posted two new bugs for Mac and Win ports, #80780 and #80781.
Note You need to log in before you can comment on or make changes to this bug.