Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 77d6a47

Browse files
authoredDec 26, 2024··
Unrolled build for rust-lang#134781
Rollup merge of rust-lang#134781 - Zalathar:backtrace, r=SparrowLii,jieyouxu Add more `begin_panic` normalizations to panic backtrace tests Since rust-lang#123244, these tests have started failing locally on some systems (rust-lang#133997) due to minor variations in how `begin_panic` is printed in the backtrace. The variation appears to occur on macOS when `rust.debuginfo-level = "line-tables-only"` is set, which is the default in `config.compiler.toml`. It does not occur when the debuginfo level is set to 1. The variation doesn't seem relevant to these tests, so this PR simply adds another custom normalization rule to account for the variation. --- Will conflict with rust-lang#134759.
2 parents 19e75f4 + 1511de3 commit 77d6a47

8 files changed

+12
-4
lines changed
 

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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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)
This repository has been archived.