Skip to content

tests: Don't check for self-printed output in std-backtrace.rs test #143401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Enselic
Copy link
Member

@Enselic Enselic commented Jul 3, 2025

The Display implementation for Backtrace used to print

stack backtrace:

but that print was since removed. See rust-lang/backtrace-rs#286 and #69042. To make the existing test pass, the print was added to the test instead. But it doesn't make sense to check for something that the test itself does since that will not detect any regressions in the implementation of Backtrace.

What the test should check is that "stack backtrace:" is not printed in Display of Backtrace. So do that instead.

This is one small steps towards resolving #71706.

The `Display` implementation for `Backtrace` used to print

    stack backtrace:

but that print was later removed. To make the existing test pass, the
print was added to the existing test. But it doesn't make sense to check
for something that the test itself does since that will not detect any
regressions in the implementation of `Backtrace`.

What the test _should_ check is that "stack backtrace:" is _not_ printed
in `Display` of `Backtrace`. So do that instead.
@rustbot
Copy link
Collaborator

rustbot commented Jul 3, 2025

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 3, 2025
@Enselic
Copy link
Member Author

Enselic commented Jul 4, 2025

For the record I'm also fine with removing all "stack backtrace" checks if that is what my reviewer prefers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants