Bug 188994 - Teach WebKitTestRunner and DumpRenderTree about detecting world leaks
Summary: Teach WebKitTestRunner and DumpRenderTree about detecting world leaks
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks: 186214
  Show dependency treegraph
 
Reported: 2018-08-27 11:20 PDT by Simon Fraser (smfr)
Modified: 2018-08-28 11:21 PDT (History)
10 users (show)

See Also:


Attachments
Patch (40.19 KB, patch)
2018-08-27 11:29 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (40.11 KB, patch)
2018-08-27 14:33 PDT, Simon Fraser (smfr)
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2018-08-27 11:20:18 PDT
Teach WebKitTestRunner and DumpRenderTree about detecting world leaks
Comment 1 Simon Fraser (smfr) 2018-08-27 11:29:11 PDT
Created attachment 348176 [details]
Patch
Comment 2 EWS Watchlist 2018-08-27 11:31:56 PDT
Attachment 348176 [details] did not pass style-queue:


ERROR: Tools/WebKitTestRunner/TestController.h:53:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Tools/WebKitTestRunner/TestController.h:73:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Tools/WebKitTestRunner/TestController.h:266:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Tools/WebKitTestRunner/TestController.cpp:1378:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 4 in 20 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Simon Fraser (smfr) 2018-08-27 14:33:53 PDT
Created attachment 348201 [details]
Patch
Comment 4 EWS Watchlist 2018-08-27 14:36:58 PDT
Attachment 348201 [details] did not pass style-queue:


ERROR: Tools/WebKitTestRunner/TestController.h:53:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Tools/WebKitTestRunner/TestController.h:73:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Tools/WebKitTestRunner/TestController.h:266:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Tools/WebKitTestRunner/TestController.cpp:1379:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 4 in 20 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Simon Fraser (smfr) 2018-08-27 16:31:53 PDT
https://trac.webkit.org/r235408
Comment 6 Radar WebKit Bug Importer 2018-08-27 16:33:27 PDT
<rdar://problem/43775591>
Comment 7 Jonathan Bedard 2018-08-28 08:23:57 PDT
I hate to bring this up after this patch has landed, but, any reason we didn't simply add a new option on the input line? (Grep for '--pixel-test' in TestController.cpp)
Comment 8 Simon Fraser (smfr) 2018-08-28 08:27:39 PDT
(In reply to Jonathan Bedard from comment #7)
> I hate to bring this up after this patch has landed, but, any reason we
> didn't simply add a new option on the input line? (Grep for '--pixel-test'
> in TestController.cpp)

There is:
optionList.append(Option("--check-for-world-leaks", "Check for leaks of world objects (currently, documents)", handleOptionCheckForWorldLeaks));

or did you mean something else?
Comment 9 Jonathan Bedard 2018-08-28 08:57:21 PDT
(In reply to Simon Fraser (smfr) from comment #8)
> (In reply to Jonathan Bedard from comment #7)
> > I hate to bring this up after this patch has landed, but, any reason we
> > didn't simply add a new option on the input line? (Grep for '--pixel-test'
> > in TestController.cpp)
> 
> There is:
> optionList.append(Option("--check-for-world-leaks", "Check for leaks of
> world objects (currently, documents)", handleOptionCheckForWorldLeaks));
> 
> or did you mean something else?

I'm talking about the ability of WebKitTestRunner to accept options on the stdin line that contains the layout test to be run.

line 1321 in TestController.cpp contains a function named 'parseInputLine' which takes the line read from WebKitTestRunner's stdin and extracts a few options from it. Is there a reason that world leaks can't use this? It seems that this offers basically the same functionality as handleControlCommand().
Comment 10 Simon Fraser (smfr) 2018-08-28 10:56:08 PDT
parseInputLine() expects the first part to be a test URL, and would have to be changed to not run a test, but get the leaks results. I think my way is a bit clearer.
Comment 11 Jonathan Bedard 2018-08-28 11:21:33 PDT
(In reply to Simon Fraser (smfr) from comment #10)
> parseInputLine() expects the first part to be a test URL, and would have to
> be changed to not run a test, but get the leaks results. I think my way is a
> bit clearer.

Or we could set it to run after the test finishes, but I agree now that I understand this better, your way is clearer.