From fdc6db4245ea3db06fe20cf4e461154add7fe29f Mon Sep 17 00:00:00 2001 From: Zalathar Date: Thu, 26 Dec 2024 15:47:26 +1100 Subject: [PATCH] Add more `begin_panic` normalizations to panic backtrace tests --- tests/ui/panics/issue-47429-short-backtraces.rs | 2 ++ tests/ui/panics/issue-47429-short-backtraces.run.stderr | 2 +- tests/ui/panics/runtime-switch.rs | 2 ++ tests/ui/panics/runtime-switch.run.stderr | 2 +- tests/ui/panics/short-ice-remove-middle-frames-2.rs | 2 ++ tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr | 2 +- tests/ui/panics/short-ice-remove-middle-frames.rs | 2 ++ tests/ui/panics/short-ice-remove-middle-frames.run.stderr | 2 +- 8 files changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/ui/panics/issue-47429-short-backtraces.rs b/tests/ui/panics/issue-47429-short-backtraces.rs index 0d216fdd6530f..e079a4f875356 100644 --- a/tests/ui/panics/issue-47429-short-backtraces.rs +++ b/tests/ui/panics/issue-47429-short-backtraces.rs @@ -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]+" -> "" diff --git a/tests/ui/panics/issue-47429-short-backtraces.run.stderr b/tests/ui/panics/issue-47429-short-backtraces.run.stderr index 1078a2fbc9025..6a22e0215fee1 100644 --- a/tests/ui/panics/issue-47429-short-backtraces.run.stderr +++ b/tests/ui/panics/issue-47429-short-backtraces.run.stderr @@ -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 diff --git a/tests/ui/panics/runtime-switch.rs b/tests/ui/panics/runtime-switch.rs index 10dce25090932..d2768e0df1767 100644 --- a/tests/ui/panics/runtime-switch.rs +++ b/tests/ui/panics/runtime-switch.rs @@ -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]+" -> "" diff --git a/tests/ui/panics/runtime-switch.run.stderr b/tests/ui/panics/runtime-switch.run.stderr index abbb91eba60e0..35be010d6be71 100644 --- a/tests/ui/panics/runtime-switch.run.stderr +++ b/tests/ui/panics/runtime-switch.run.stderr @@ -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 diff --git a/tests/ui/panics/short-ice-remove-middle-frames-2.rs b/tests/ui/panics/short-ice-remove-middle-frames-2.rs index c2f04cd122c73..54327b7df9e9f 100644 --- a/tests/ui/panics/short-ice-remove-middle-frames-2.rs +++ b/tests/ui/panics/short-ice-remove-middle-frames-2.rs @@ -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]+" -> "" diff --git a/tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr b/tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr index 67577f3568e91..ab23ce7806257 100644 --- a/tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr +++ b/tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr @@ -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 diff --git a/tests/ui/panics/short-ice-remove-middle-frames.rs b/tests/ui/panics/short-ice-remove-middle-frames.rs index c035e7e69bc63..b266efc61840a 100644 --- a/tests/ui/panics/short-ice-remove-middle-frames.rs +++ b/tests/ui/panics/short-ice-remove-middle-frames.rs @@ -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]+" -> "" diff --git a/tests/ui/panics/short-ice-remove-middle-frames.run.stderr b/tests/ui/panics/short-ice-remove-middle-frames.run.stderr index 63fa466ab24ad..d2616911e3bf8 100644 --- a/tests/ui/panics/short-ice-remove-middle-frames.run.stderr +++ b/tests/ui/panics/short-ice-remove-middle-frames.run.stderr @@ -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