Closed Bug 2029980 Opened 7 months ago Closed 11 days ago

Add mochitest-repeat jobs to identify tests that don't clean up properly

Categories

(Firefox Build System :: Task Configuration, task)

task

Tracking

(firefox162 fixed)

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: florian, Assigned: florian)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(5 external files, 5 obsolete files)

Add a repeat variant for mochitest jobs that runs each test twice in the same browser instance (using --repeat=1). This catches tests that leave behind state affecting subsequent tests, complementing standalone jobs (which restart the browser between tests) and chaos mode (which shakes out timing issues). Together these cover the three test-verify steps, enabling test-verify to become tier 1.

Repeat jobs are added for mochitest-plain, mochitest-chrome, mochitest-browser-chrome, and mochitest-devtools-chrome, running on backstop pushes on autoland and mozilla-central for linux and windows.

Try push: https://treeherder.mozilla.org/jobs?repo=try&revision=d72ea1065f1862169ab76fd30e0073ec672a2e4a

This is far from green, we could either debug the failures or add many skip-if annotations if we would like to land this sooner than later. I'm opening the bug to attach the WIP patch I have.

Blocks: 1975728
No longer blocks: 2029187
Depends on: 2029187
Assignee: nobody → florian
Status: NEW → ASSIGNED
Depends on: 2090991

It stays false in --verify mode, which sets --repeat for its own steps. Other
--repeat users, like --run-until-failure and confirm-failures, skip tests that
cannot run twice.

Plain, chrome and a11y tests looped over the whole test list instead, and
browser-chrome ran the first test of each browser session one time short.
TestRunner.js now reruns each test before moving to the next one, so the code
restarting the whole list goes away. Adjacent tests that hand state to each
other now fail under --repeat. This also affects test-verify, which runs with
--repeat.

test_sanityRegisteredServiceWorker.html failed when run again right after
itself: registering over its own leftover registration does not notify
SpecialPowers, so the end-of-test check saw no worker.
test_sanityRegisteredServiceWorker2.html unregisters that leftover worker,
so it can only pass once.

Resuming skipped as many tests as had already started, so with --repeat it
could drop the rest of the manifest. The retry of failed tests had no resume
at all: when a retried test ended the session, the failed tests after it were
neither rerun nor reported. With --restart-after-failure, every failed test is
now retried, instead of stopping at the first one that fails again.

Jobs without runtime data, such as the new repeat variant or a renamed
platform, fall back to default-chunks, which were as low as half the dynamic
counts and did not fit in max-run-time. This also lowers a few that were above
the dynamic counts.

Attachment #9566911 - Attachment description: WIP: Bug 2029980 - Add mochitest-repeat jobs to identify tests that don't clean up properly, . → Bug 2029980 - Add mochitest repeat tasks that run each test twice in a row, without scheduling them yet, r=#taskgraph-reviewers.

Like the standalone variant: on backstop pushes, on Linux and Windows only, to
spare the mac pool.

Like the standalone variant: on backstop pushes, on Linux and Windows only, to
spare the mac pool.

Like the standalone variant: on backstop pushes, on Linux and Windows only, to
spare the mac pool.

Like the standalone variant: on backstop pushes, on Linux and Windows only, to
spare the mac pool.

Depends on: 2092091
Depends on: 2092566
Depends on: 2092575
Depends on: 2092741

Comment on attachment 9679033 [details]
Bug 2029980 - Resume mochitests after a session ends early with the tests that did not start, also when retrying failures, r=ahal.

Revision D341598 was moved to bug 2092741. Setting attachment 9679033 [details] to obsolete.

Attachment #9679033 - Attachment is obsolete: true

Comment on attachment 9679035 [details]
Bug 2029980 - Run mochitest-devtools-chrome-repeat on autoland and mozilla-central, r=#taskgraph-reviewers.

Revision D341600 was moved to bug 2090991. Setting attachment 9679035 [details] to obsolete.

Attachment #9679035 - Attachment is obsolete: true

Comment on attachment 9679036 [details]
Bug 2029980 - Run mochitest-browser-chrome-repeat on autoland and mozilla-central, r=#taskgraph-reviewers.

Revision D341601 was moved to bug 2092566. Setting attachment 9679036 [details] to obsolete.

Attachment #9679036 - Attachment is obsolete: true

Comment on attachment 9679038 [details]
Bug 2029980 - Run mochitest-chrome-repeat-1proc on autoland and mozilla-central, r=#taskgraph-reviewers.

Revision D341603 was moved to bug 2092575. Setting attachment 9679038 [details] to obsolete.

Attachment #9679038 - Attachment is obsolete: true
Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/68dbd9dc0cdd https://hg.mozilla.org/integration/autoland/rev/95831d6f7939 Add a repeat manifest condition for mochitests running with --repeat, r=ahal,mozbase-reviewers. https://github.com/mozilla-firefox/firefox/commit/c2f94bd0ce82 https://hg.mozilla.org/integration/autoland/rev/316d2397e4c0 Make --repeat run each mochitest again right after itself, r=ahal. https://github.com/mozilla-firefox/firefox/commit/2f626aa6eebd https://hg.mozilla.org/integration/autoland/rev/0c48e4f16a10 Make Harness_sanity's service worker tests pass with --repeat, r=ahal. https://github.com/mozilla-firefox/firefox/commit/8d64d136e947 https://hg.mozilla.org/integration/autoland/rev/875c98e49e44 Align the mochitest default-chunks with the chunk counts dynamic chunking currently picks, r=taskgraph-reviewers,ahal. https://github.com/mozilla-firefox/firefox/commit/3154dedd964a https://hg.mozilla.org/integration/autoland/rev/d21834384932 Add mochitest repeat tasks that run each test twice in a row, without scheduling them yet, r=taskgraph-reviewers,ahal.
Pushed by ctuns@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/59907cc1ef42 https://hg.mozilla.org/integration/autoland/rev/e133333ea879 Revert "Bug 2029980 - Add mochitest repeat tasks that run each test twice in a row, without scheduling them yet, r=taskgraph-reviewers,ahal." for causing python-firefox-ci failures

Backed out for causing python-firefox-ci failures

Flags: needinfo?(florian)

The failure is actually the same as what's described in bug 2080077, the job running out of memory when we add more tasks.

Flags: needinfo?(florian)
See Also: → 2080077
Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/904d99ffe0bd https://hg.mozilla.org/integration/autoland/rev/1eb2d83e1e6e Add a repeat manifest condition for mochitests running with --repeat, r=ahal,mozbase-reviewers. https://github.com/mozilla-firefox/firefox/commit/f451c5aa5608 https://hg.mozilla.org/integration/autoland/rev/95d6332a2589 Make --repeat run each mochitest again right after itself, r=ahal. https://github.com/mozilla-firefox/firefox/commit/cf6db0017f0f https://hg.mozilla.org/integration/autoland/rev/b0508d40c9e6 Make Harness_sanity's service worker tests pass with --repeat, r=ahal. https://github.com/mozilla-firefox/firefox/commit/9b4a8ff7bbf3 https://hg.mozilla.org/integration/autoland/rev/ab87ba323c8d Align the mochitest default-chunks with the chunk counts dynamic chunking currently picks, r=taskgraph-reviewers,ahal.
Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/60cb56c693a0 https://hg.mozilla.org/integration/autoland/rev/06a019b1d08e Add mochitest repeat tasks that run each test twice in a row, without scheduling them yet, r=taskgraph-reviewers,ahal.
Regressions: 2093700
Depends on: 2095794

Comment on attachment 9679037 [details]
Bug 2029980 - Run mochitest-plain-repeat on autoland and mozilla-central, r=#taskgraph-reviewers.

Revision D341602 was moved to bug 2095794. Setting attachment 9679037 [details] to obsolete.

Attachment #9679037 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: