Closed Bug 772388 Opened 8 years ago Closed 8 years ago

Make ShutdownLeakLogger output the list of leaking tests in a format that can be individually starred

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla16

People

(Reporter: emorley, Assigned: emorley)

References

(Blocks 1 open bug)

Details

(Whiteboard: [qa-])

Attachments

(1 file)

The shutdown leak logger added in bug 683953 outputs the something like the following if the leak threshold is exceeded:

TEST-UNEXPECTED-FAIL | ShutdownLeaks | leaked 7 DOMWindow(s) and 1 DocShell(s) until shutdown

[browser/components/privatebrowsing/test/browser/browser_privatebrowsing_ui.js]
  2 window(s) [url = chrome://browser/content/browser.xul]
  2 window(s) [url = about:blank]

...

[browser/components/places/tests/browser/browser_views_liveupdate.js]
  1 window(s) [url = about:blank]
  1 window(s) [url = chrome://browser/content/bookmarks/bookmarksPanel.xul]

TBPL only shows the TEST-UNEXPECTED-FAIL line in the summary box, which has to be manually starred due to the lack of filename. Not only is this time consuming, but the individual bugs filed as dependants of bug 754804 don't get logs posted in the comments, so get ignored by their owners & we have no easy way to prioritise which to chase up first.

As such, I think we should change the output to:

TEST-UNEXPECTED-FAIL | browser/components/privatebrowsing/test/browser/browser_privatebrowsing_ui.js | leaked 2 DOMWindow(s) and 2 DocShell(s) until shutdown
TEST-UNEXPECTED-FAIL | browser/components/privatebrowsing/test/browser/browser_privatebrowsing_ui.js | 2 window(s) [url = chrome://browser/content/browser.xul]
TEST-UNEXPECTED-FAIL | browser/components/privatebrowsing/test/browser/browser_privatebrowsing_ui.js | 2 window(s) [url = about:blank]

...

TEST-UNEXPECTED-FAIL | browser/components/places/tests/browser/browser_views_liveupdate.js | leaked 1 DOMWindow(s) and 1 DocShell(s) until shutdown
TEST-UNEXPECTED-FAIL | browser/components/places/tests/browser/browser_views_liveupdate.js | 1 window(s) [url = about:blank]
TEST-UNEXPECTED-FAIL | browser/components/places/tests/browser/browser_views_liveupdate.js | 1 window(s) [url = chrome://browser/content/bookmarks/bookmarksPanel.xul]
Attached patch Patch v1Splinter Review
Will give output in the following format:

> TEST-UNEXPECTED-FAIL | ShutdownLeaks | leaked 7 DOMWindow(s) and 1 DocShell(s) until shutdown
>
> TEST-UNEXPECTED-FAIL | browser/components/privatebrowsing/test/browser/browser_privatebrowsing_ui.js | leaked 2 window(s) until shutdown [url = chrome://browser/content/browser.xul]
> TEST-UNEXPECTED-FAIL | browser/components/privatebrowsing/test/browser/browser_privatebrowsing_ui.js | leaked 2 window(s) until shutdown [url = about:blank]
>
> ...

(Or as before, if under the threshold s/UNEXPECTED-FAIL/INFO/ )

https://tbpl.mozilla.org/?tree=Try&rev=46377d01bf8b
Assignee: nobody → bmo
Status: NEW → ASSIGNED
Attachment #640574 - Flags: review?(ttaubert)
Comment on attachment 640574 [details] [diff] [review]
Patch v1

Review of attachment 640574 [details] [diff] [review]:
-----------------------------------------------------------------

Sounds like a good idea to me. Thanks for doing this!
Attachment #640574 - Flags: review?(ttaubert) → review+
Thank you :-)

https://hg.mozilla.org/integration/mozilla-inbound/rev/addac3423b97
Flags: in-testsuite-
Whiteboard: [qa-]
Target Milestone: --- → mozilla16
https://hg.mozilla.org/mozilla-central/rev/addac3423b97
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Blocks: 778688
Component: BrowserTest → Mochitest
You need to log in before you can comment on or make changes to this bug.