mochitest differences with and without --debugger=rr
Categories
(Testing :: Mochitest, defect, P1)
Tracking
(firefox76 fixed)
Tracking | Status | |
---|---|---|
firefox76 | --- | fixed |
People
(Reporter: sg, Assigned: gbrown)
Details
(Whiteboard: dev-prod-2020)
Attachments
(1 file)
When running a mochitest with --debugger=rr
, the exit code changes from 0 to 1 on a successful execution, e.g.
[simon@sigibln mozilla-unified]$ ./mach mochitest --headless dom/broadcastchannel/tests/test_broadcastchannel_worker.html
# ...
mochitest-plain
~~~~~~~~~~~~~~~
Ran 6 checks (1 asserts, 4 subtests, 1 tests)
Expected results: 6
Unexpected results: 0
OK
[simon@sigibln mozilla-unified]$ echo $?
0
[simon@sigibln mozilla-unified]$ ./mach mochitest --headless dom/broadcastchannel/tests/test_broadcastchannel_worker.html --debugger=rr
# ...
mochitest-plain
~~~~~~~~~~~~~~~
Ran 1 checks (1 asserts)
Expected results: 1
Unexpected results: 0
OK
[simon@sigibln mozilla-unified]$ echo $?
1
Note that also the output regarding results changes, but this is only minor (except it has actual execution differences).
The fact that it returns exit code 1 on a successful execution is really annoying, since I often run a loop that shall break on an unsuccesful execution. This problem does not occur with wpt
and xpcshell-test
, IIRC.
Updated•4 years ago
|
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
I also noticed one further annoying related thing: When running with --debugger=rr
, the test summary shows a test as passing, although it had failures:
6:35.76 GECKO(587) TEST-UNEXPECTED-FAIL | /tests/dom/indexedDB/test/test_file_delete.html | Correct db ref count (even after 100 garbage collections) - expected: PASS
...
6:55.33 SUITE_END
6:55.33
Overall Summary
===============
mochitest-plain
~~~~~~~~~~~~~~~
Ran 1 checks (1 asserts)
Expected results: 1
Unexpected results: 0
OK
Comment 2•4 years ago
|
||
Hi Andrew, this is preventing us from investigating some nasty intermittents. Can we expect some improvement here? Thank you!
Comment 3•4 years ago
|
||
Geoff, any chance you could add this to your backlog?
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
I can reproduce this easily, even with a dummy pass-through debugger. Status is reset at:
because all the counts are 0. Now, why is that...
Assignee | ||
Comment 5•4 years ago
|
||
...because https://searchfox.org/mozilla-central/rev/fa2df28a49883612bd7af4dacd80cdfedcccd2f6/testing/mochitest/runtests.py#3082 exits early because the action is not 'log'; it is 'process_output' instead:
{'process': 'GECKO(12441)', 'action': 'process_output', 'data': u'Passed: 6'}
Assignee | ||
Comment 6•4 years ago
|
||
...because
throws a ValueError because the message fragment is plain text, like "Passed: 6".
...because TestRunner.js does not use the structured log format when running in a debugger (since bug 1042998):
Assignee | ||
Comment 7•4 years ago
|
||
Allow for the alternate message format used by TestRunner.js when running in a debugger:
https://searchfox.org/mozilla-central/rev/fa2df28a49883612bd7af4dacd80cdfedcccd2f6/testing/mochitest/tests/SimpleTest/TestRunner.js#259
Pushed by gbrown@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0c5954b38d69 Fix mochitest pass/fail count handling when running in debugger; r=bc
Comment 9•4 years ago
|
||
bugherder |
Description
•