Skip to content

Commit

Permalink
Add more begin_panic normalizations to panic backtrace tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Zalathar committed Dec 26, 2024
1 parent a25032c commit fdc6db4
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions tests/ui/panics/issue-47429-short-backtraces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
// This is needed to avoid test output differences across std being built with v0 symbols vs legacy
// symbols.
//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic"
// FIXME(#133997): This variation appears on some systems for unknown reasons.
//@ normalize-stderr-test: " begin_panic<&str>" -> " std::panicking::begin_panic"
// And this is for differences between std with and without debuginfo.
//@ normalize-stderr-test: "\n +at [^\n]+" -> ""

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/panics/issue-47429-short-backtraces.run.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
thread 'main' panicked at $DIR/issue-47429-short-backtraces.rs:24:5:
thread 'main' panicked at $DIR/issue-47429-short-backtraces.rs:26:5:
explicit panic
stack backtrace:
0: std::panicking::begin_panic
Expand Down
2 changes: 2 additions & 0 deletions tests/ui/panics/runtime-switch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
// This is needed to avoid test output differences across std being built with v0 symbols vs legacy
// symbols.
//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic"
// FIXME(#133997): This variation appears on some systems for unknown reasons.
//@ normalize-stderr-test: " begin_panic<&str>" -> " std::panicking::begin_panic"
// And this is for differences between std with and without debuginfo.
//@ normalize-stderr-test: "\n +at [^\n]+" -> ""

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/panics/runtime-switch.run.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
thread 'main' panicked at $DIR/runtime-switch.rs:27:5:
thread 'main' panicked at $DIR/runtime-switch.rs:29:5:
explicit panic
stack backtrace:
0: std::panicking::begin_panic
Expand Down
2 changes: 2 additions & 0 deletions tests/ui/panics/short-ice-remove-middle-frames-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// This is needed to avoid test output differences across std being built with v0 symbols vs legacy
// symbols.
//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic"
// FIXME(#133997): This variation appears on some systems for unknown reasons.
//@ normalize-stderr-test: " begin_panic<&str>" -> " std::panicking::begin_panic"
// And this is for differences between std with and without debuginfo.
//@ normalize-stderr-test: "\n +at [^\n]+" -> ""

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
thread 'main' panicked at $DIR/short-ice-remove-middle-frames-2.rs:61:5:
thread 'main' panicked at $DIR/short-ice-remove-middle-frames-2.rs:63:5:
debug!!!
stack backtrace:
0: std::panicking::begin_panic
Expand Down
2 changes: 2 additions & 0 deletions tests/ui/panics/short-ice-remove-middle-frames.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
// This is needed to avoid test output differences across std being built with v0 symbols vs legacy
// symbols.
//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic"
// FIXME(#133997): This variation appears on some systems for unknown reasons.
//@ normalize-stderr-test: " begin_panic<&str>" -> " std::panicking::begin_panic"
// And this is for differences between std with and without debuginfo.
//@ normalize-stderr-test: "\n +at [^\n]+" -> ""

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/panics/short-ice-remove-middle-frames.run.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
thread 'main' panicked at $DIR/short-ice-remove-middle-frames.rs:57:5:
thread 'main' panicked at $DIR/short-ice-remove-middle-frames.rs:59:5:
debug!!!
stack backtrace:
0: std::panicking::begin_panic
Expand Down

0 comments on commit fdc6db4

Please sign in to comment.