rust-lang / rust-lang/rust

Port backtrace-rs test-crates to rustc repo

Open
#122,899 12 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-backtrace A-testsuite C-enhancement E-help-wanted E-mentor E-tedious
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

backtrace-rs has a number of subcrates which it uses to test more complicated logic that is harder to observe from inside a program, leading to this exciting yaml: https://github.com/rust-lang/backtrace-rs/blob/6fa4b85b9962c3e1be8c2e5cc605cd078134152b/.github/workflows/main.yml#L54-L69

while tests inside backtrace's library itself will be run as part of the stdlib's test suite, these are not. backtrace-rs failed to run nightly testing for Windows, which would have caught this. however, many of these tests are directly relevant to rustc's functionality as well, and changes should not be landed in rustc which break them without very good reason. failing to include these tests led to a severe regression in backtraces on Windows. these tests should be ported to run inside rustc's existing test infrastructure where they are relevant. I have excepted one which was already based on a rustc test and one which is only relevant for backtrace-rs.

if you would like to work on porting one of these tests, please link to this issue in your PR and leave a comment to claim the test. if you are stuck, please don't hesitate to open a thread on the rust zulip! and be aware, some may be complex enough to need the new recipes infrastructure, but hopefully not. I expect all may need, however, this compiletest annotation:

//@ needs-unwind

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Choose an unchecked test crate, starting with crates/debuglink or crates/without_debuginfo and the linked ci/debuglink-docker.sh and ci/debuglink.sh scripts. Read rustc's existing test infrastructure and the issue's recipes discussion, then determine whether the test needs //@ needs-unwind. Done means the relevant test runs in rustc's infrastructure and preserves the backtrace behavior it currently checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.