Closed Bug 2072901 Opened 2 months ago Closed 1 month ago

Shutdown leaks are blamed on the wrong test when a test in the manifest times out

Categories

(Testing :: Mochitest, defect)

defect

Tracking

(firefox158 fixed)

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: florian, Assigned: florian)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

When a test in the manifest times out, the leak check runs without the teardown that exists to prevent false positives, so a leak is reported against an earlier test that did not leak.

To reproduce, on a debug build, run browser/extensions/newtab/test/browser/browser_getScreenshots.js followed by a test that deliberately hangs, with a short --timeout.

https://tests.firefox.dev/test.html?test=browser/extensions/newtab/test/browser/browser_getScreenshots.js has several failures caused by this bug.

browser-test.js releases the resources it keeps alive until shutdown, and
collects twice, before checking for leaks. A test that times out ended the
session without either step, so those resources were blamed on whichever
earlier test created them - hence browser_getScreenshots.js's intermittent
backgroundPageThumbs.xhtml window and docShell leaks.

The release step, the two local collection rounds and the build-type gate are
now shared, which changes what every timing-out browser-chrome test in the tree
does.

Assignee: nobody → florian
Status: NEW → ASSIGNED
Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a980d5ebf969 https://hg.mozilla.org/integration/autoland/rev/c35ef7c35104 Run the same teardown and collections before the leak check when a test times out, r=Gijs.
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: