Skip to content

Commit 1511de3

Browse files
committed
Add more begin_panic normalizations to panic backtrace tests
1 parent a25032c commit 1511de3

8 files changed

+12
-4
lines changed

tests/ui/panics/issue-47429-short-backtraces.rs

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
// This is needed to avoid test output differences across std being built with v0 symbols vs legacy
1010
// symbols.
1111
//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic"
12+
// This variant occurs on macOS with `rust.debuginfo-level = "line-tables-only"` (#133997)
13+
//@ normalize-stderr-test: " begin_panic<&str>" -> " std::panicking::begin_panic"
1214
// And this is for differences between std with and without debuginfo.
1315
//@ normalize-stderr-test: "\n +at [^\n]+" -> ""
1416

tests/ui/panics/issue-47429-short-backtraces.run.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
thread 'main' panicked at $DIR/issue-47429-short-backtraces.rs:24:5:
1+
thread 'main' panicked at $DIR/issue-47429-short-backtraces.rs:26:5:
22
explicit panic
33
stack backtrace:
44
0: std::panicking::begin_panic

tests/ui/panics/runtime-switch.rs

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
// This is needed to avoid test output differences across std being built with v0 symbols vs legacy
1010
// symbols.
1111
//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic"
12+
// This variant occurs on macOS with `rust.debuginfo-level = "line-tables-only"` (#133997)
13+
//@ normalize-stderr-test: " begin_panic<&str>" -> " std::panicking::begin_panic"
1214
// And this is for differences between std with and without debuginfo.
1315
//@ normalize-stderr-test: "\n +at [^\n]+" -> ""
1416

tests/ui/panics/runtime-switch.run.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
thread 'main' panicked at $DIR/runtime-switch.rs:27:5:
1+
thread 'main' panicked at $DIR/runtime-switch.rs:29:5:
22
explicit panic
33
stack backtrace:
44
0: std::panicking::begin_panic

tests/ui/panics/short-ice-remove-middle-frames-2.rs

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// This is needed to avoid test output differences across std being built with v0 symbols vs legacy
1313
// symbols.
1414
//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic"
15+
// This variant occurs on macOS with `rust.debuginfo-level = "line-tables-only"` (#133997)
16+
//@ normalize-stderr-test: " begin_panic<&str>" -> " std::panicking::begin_panic"
1517
// And this is for differences between std with and without debuginfo.
1618
//@ normalize-stderr-test: "\n +at [^\n]+" -> ""
1719

tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
thread 'main' panicked at $DIR/short-ice-remove-middle-frames-2.rs:61:5:
1+
thread 'main' panicked at $DIR/short-ice-remove-middle-frames-2.rs:63:5:
22
debug!!!
33
stack backtrace:
44
0: std::panicking::begin_panic

tests/ui/panics/short-ice-remove-middle-frames.rs

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
// This is needed to avoid test output differences across std being built with v0 symbols vs legacy
1414
// symbols.
1515
//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic"
16+
// This variant occurs on macOS with `rust.debuginfo-level = "line-tables-only"` (#133997)
17+
//@ normalize-stderr-test: " begin_panic<&str>" -> " std::panicking::begin_panic"
1618
// And this is for differences between std with and without debuginfo.
1719
//@ normalize-stderr-test: "\n +at [^\n]+" -> ""
1820

tests/ui/panics/short-ice-remove-middle-frames.run.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
thread 'main' panicked at $DIR/short-ice-remove-middle-frames.rs:57:5:
1+
thread 'main' panicked at $DIR/short-ice-remove-middle-frames.rs:59:5:
22
debug!!!
33
stack backtrace:
44
0: std::panicking::begin_panic

0 commit comments

Comments
 (0)