From 5be14f5fda8da0f9169bcb798488d3b90011207a Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Wed, 14 Jun 2023 12:30:17 +0200 Subject: [PATCH 1/4] ensure test harness test works on panic=abort targets --- tests/ui/test-attrs/test-type.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ui/test-attrs/test-type.rs b/tests/ui/test-attrs/test-type.rs index 8416270fd8159..9c7b8b96d6908 100644 --- a/tests/ui/test-attrs/test-type.rs +++ b/tests/ui/test-attrs/test-type.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +// compile-flags: --test -Zpanic-abort-tests // run-flags: --test-threads=1 // check-run-results // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" From 0526267ffd2d59305319f73c4a63055c34281e45 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Wed, 14 Jun 2023 12:19:21 +0200 Subject: [PATCH 2/4] mark relevant tests as requiring unwinding --- tests/ui/asm/aarch64/may_unwind.rs | 1 + tests/ui/test-attrs/test-panic-abort-disabled.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/ui/asm/aarch64/may_unwind.rs b/tests/ui/asm/aarch64/may_unwind.rs index 6af8728bbaa96..cfb75078264df 100644 --- a/tests/ui/asm/aarch64/may_unwind.rs +++ b/tests/ui/asm/aarch64/may_unwind.rs @@ -1,6 +1,7 @@ // only-aarch64 // run-pass // needs-asm-support +// needs-unwind #![feature(asm_unwind)] diff --git a/tests/ui/test-attrs/test-panic-abort-disabled.rs b/tests/ui/test-attrs/test-panic-abort-disabled.rs index 874dbdb42c33c..fa67a784de47f 100644 --- a/tests/ui/test-attrs/test-panic-abort-disabled.rs +++ b/tests/ui/test-attrs/test-panic-abort-disabled.rs @@ -3,6 +3,7 @@ // compile-flags: --test -Cpanic=abort -Zpanic-abort-tests=no // run-flags: --test-threads=1 +// needs-unwind // ignore-wasm no panic or subprocess support // ignore-emscripten no panic or subprocess support From f5d3de2abccd0de94d96367b35e33a776a242d69 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Wed, 14 Jun 2023 12:31:00 +0200 Subject: [PATCH 3/4] update codegent test to be independent of panic strategy --- tests/codegen/naked-nocoverage.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/codegen/naked-nocoverage.rs b/tests/codegen/naked-nocoverage.rs index 91a6260bf2aa2..3c755e49c6dba 100644 --- a/tests/codegen/naked-nocoverage.rs +++ b/tests/codegen/naked-nocoverage.rs @@ -11,7 +11,7 @@ use std::arch::asm; #[naked] #[no_mangle] pub unsafe extern "C" fn f() { - // CHECK: define void @f() + // CHECK: define {{(dso_local )?}}void @f() // CHECK-NEXT: start: // CHECK-NEXT: call void asm // CHECK-NEXT: unreachable From fd4726f74041672c20e9e0753058bf7712dcff19 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Wed, 21 Jun 2023 09:14:47 +0200 Subject: [PATCH 4/4] remove needs-unwind attr for test with -Zpanic-abort-tests --- tests/ui/test-attrs/test-type.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/ui/test-attrs/test-type.rs b/tests/ui/test-attrs/test-type.rs index 9c7b8b96d6908..d6d44a6b4461b 100644 --- a/tests/ui/test-attrs/test-type.rs +++ b/tests/ui/test-attrs/test-type.rs @@ -3,7 +3,6 @@ // check-run-results // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" // ignore-emscripten no threads support -// needs-unwind // run-pass #[test]