-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Fix problems with backtraces in two ui tests. #111052
Conversation
@bors rollup |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
tests/ui/panics/default-backtrace-ice.rs
test.
After some discussion with @ehuss:
|
Ok, I found a way to change |
@bors r+ |
Fix problems with backtraces in two ui tests. `default-backtrace-ice.rs` started started failing for me recently, because on my Ubuntu 23.04 system there are 100 stack frames, and the current stack filtering pattern doesn't match on a stack frame with a three digit number. `issue-86800.rs` can also be improved, backtrace-wise. r? `@Nilstrieb`
Fix problems with backtraces in two ui tests. `default-backtrace-ice.rs` started started failing for me recently, because on my Ubuntu 23.04 system there are 100 stack frames, and the current stack filtering pattern doesn't match on a stack frame with a three digit number. `issue-86800.rs` can also be improved, backtrace-wise. r? ``@Nilstrieb``
Fix problems with backtraces in two ui tests. `default-backtrace-ice.rs` started started failing for me recently, because on my Ubuntu 23.04 system there are 100 stack frames, and the current stack filtering pattern doesn't match on a stack frame with a three digit number. `issue-86800.rs` can also be improved, backtrace-wise. r? ```@Nilstrieb```
Fix problems with backtraces in two ui tests. `default-backtrace-ice.rs` started started failing for me recently, because on my Ubuntu 23.04 system there are 100 stack frames, and the current stack filtering pattern doesn't match on a stack frame with a three digit number. `issue-86800.rs` can also be improved, backtrace-wise. r? ````@Nilstrieb````
Because it then just has to be filtered out. This change makes this test more like these other tests: - tests/ui/treat-err-as-bug/err.rs - tests/ui/treat-err-as-bug/delay_span_bug.rs - tests/ui/mir/validate/storage-live.rs - tests/ui/associated-inherent-types/bugs/ice-substitution.rs - tests/ui/layout/valid_range_oob.rs
This test is supposed to ensure that full backtraces are used for ICEs. But it doesn't actually do that -- the filtering done cannot distinguish between a full backtrace versus a short backtrace. So this commit changes the filtering to preserve the existence of `__rust_{begin,end}_short_backtrace` markers, which only appear in full backtraces. This change means the test now tests what it is supposed to test. Also, the existing filtering included a rule that excluded any line starting with two spaces. This was too strong because it filtered out some parts of the error message. (This was not a showstopper). It was also not strong enough because it didn't work with three digit stack frame numbers, which just started seeing after upgrading my Ubuntu distro to 23.04 machine (this *was* a showstopper). So the commit replaces that rule with two more precise rules, one for lines with stack frame numbers, and one for "at ..." lines.
Tests for stack traces are always fun like this. I've tried ignoring msvc platforms. @bors try |
⌛ Trying commit f20738d with merge b35082701814d07b4b0fefce3753957fe244de7b... |
r=me on the fixups, you can @bors delegate+ |
✌️ @nnethercote can now approve this pull request |
☀️ Try build successful - checks-actions |
@bors r=Nilstrieb |
Rollup of 8 pull requests Successful merges: - rust-lang#110946 (avoid duplicating TLS state between test std and realstd) - rust-lang#110954 (Reject borrows of projections in ConstProp.) - rust-lang#111052 (Fix problems with backtraces in two ui tests.) - rust-lang#111132 (cleanup nll generalizer) - rust-lang#111173 (Still more encoder cleanups) - rust-lang#111187 (bootstrap: add llvm-project/runtimes to the sources) - rust-lang#111213 (Fixup "since" dates for `array_tuple_conv` feature) - rust-lang#111223 (Use `free-args` consistently in bootstrap) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
default-backtrace-ice.rs
started started failing for me recently,because on my Ubuntu 23.04 system there are 100 stack frames, and the
current stack filtering pattern doesn't match on a stack frame with a
three digit number.
issue-86800.rs
can also be improved, backtrace-wise.r? @Nilstrieb