Closed Bug 1339458 Opened 3 years ago Closed 3 years ago

Ensure tests run with RUST_BACKTRACE=1 in the environment

Categories

(Testing :: General, defect)

defect
Not set

Tracking

(firefox54 fixed)

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: kats, Assigned: kats)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Now that we're getting more rust code in Firefox and running in automated tests, we should try to ensure that RUST_BACKTRACE=1 is set in all of our testing environments, because this can help debug crashes from rust panics. It certainly doesn't hurt to have the backtrace, and is more useful than a message saying "set RUST_BACKTRACE=1 to get a backtrace" :)
Assignee: nobody → bugmail
Comment on attachment 8837172 [details]
Bug 1339458 - Set RUST_BACKTRACE=1 when running automated tests.

https://reviewboard.mozilla.org/r/112390/#review113760

this is a nice simple patch, happy to re-review if you determine talos and android could use the same changes.

::: testing/mozharness/scripts/desktop_unittest.py:700
(Diff revision 1)
>                      env['MINIDUMP_STACKWALK'] = self.minidump_stackwalk_path
>                  if self.query_nodejs():
>                      env['MOZ_NODE_PATH'] = self.nodejs_path
>                  env['MOZ_UPLOAD_DIR'] = self.query_abs_dirs()['abs_blob_upload_dir']
>                  env['MINIDUMP_SAVE_PATH'] = self.query_abs_dirs()['abs_blob_upload_dir']
> +                env['RUST_BACKTRACE'] = '1'

do we need to do this for android as well?  What about talos?
Attachment #8837172 - Flags: review?(jmaher) → review+
(In reply to Joel Maher ( :jmaher) from comment #2)
> 
> do we need to do this for android as well?  What about talos?

Yeah we should probably do it for those as well. Where should I put it for those? I did some more grepping and found additional spots to add this in android_emulator_unittest.py, marionette.py, and web_platform_tests.py. Any other places I'm missing?
In addition to what you found, I believe we also need:
firefox_media_tests_taskcluster.py
firefox_ui_tests/functional.py
talos_script.py
Updated review request to catch them all! (cue pokemon music)
Comment on attachment 8837172 [details]
Bug 1339458 - Set RUST_BACKTRACE=1 when running automated tests.

I don't know how to trigger a re-review from MozReview so I'm just setting the flag in bugzilla. :/
Attachment #8837172 - Flags: review+ → review?(jmaher)
Comment on attachment 8837172 [details]
Bug 1339458 - Set RUST_BACKTRACE=1 when running automated tests.

https://reviewboard.mozilla.org/r/112390/#review113786

r+ again!
Attachment #8837172 - Flags: review?(jmaher) → review+
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5d74575ffa14
Set RUST_BACKTRACE=1 when running automated tests. r=jmaher
https://hg.mozilla.org/mozilla-central/rev/5d74575ffa14
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.