From 8a08514dbd75d33a82bc32fb53dc1de3cd9fc308 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Tue, 2 May 2023 10:53:09 +0000 Subject: [PATCH] Add needs-unwind annotations to tests that need stack unwinding --- tests/incremental/change_crate_dep_kind.rs | 1 + tests/incremental/issue-80691-bad-eval-cache.rs | 1 + tests/run-make/c-unwind-abi-catch-lib-panic/Makefile | 1 + tests/run-make/c-unwind-abi-catch-panic/Makefile | 1 + tests/run-make/const_fn_mir/Makefile | 1 + tests/run-make/debug-assertions/Makefile | 1 + tests/run-make/foreign-double-unwind/Makefile | 1 + tests/run-make/foreign-exceptions/Makefile | 1 + tests/run-make/foreign-rust-exceptions/Makefile | 1 + tests/run-make/libtest-json/Makefile | 1 + tests/run-make/static-unwinding/Makefile | 1 + tests/run-make/test-benches/Makefile | 1 + tests/ui/test-attrs/test-type.rs | 1 + 13 files changed, 13 insertions(+) diff --git a/tests/incremental/change_crate_dep_kind.rs b/tests/incremental/change_crate_dep_kind.rs index 8c35f6ca0000..f518266016e0 100644 --- a/tests/incremental/change_crate_dep_kind.rs +++ b/tests/incremental/change_crate_dep_kind.rs @@ -2,6 +2,7 @@ // detected then -Zincremental-verify-ich will trigger an assertion. // ignore-wasm32-bare compiled with panic=abort by default +// needs-unwind // revisions:cfail1 cfail2 // compile-flags: -Z query-dep-graph -Cpanic=unwind // build-pass (FIXME(62277): could be check-pass?) diff --git a/tests/incremental/issue-80691-bad-eval-cache.rs b/tests/incremental/issue-80691-bad-eval-cache.rs index 1a644fd88d6b..ad8a338a7964 100644 --- a/tests/incremental/issue-80691-bad-eval-cache.rs +++ b/tests/incremental/issue-80691-bad-eval-cache.rs @@ -1,6 +1,7 @@ // revisions: rfail1 rfail2 // failure-status: 101 // error-pattern: not implemented +// needs-unwind -Cpanic=abort causes abort instead of exit(101) pub trait Interner { type InternedVariableKinds; diff --git a/tests/run-make/c-unwind-abi-catch-lib-panic/Makefile b/tests/run-make/c-unwind-abi-catch-lib-panic/Makefile index 9c41a5a717e7..b8e0e9483cd9 100644 --- a/tests/run-make/c-unwind-abi-catch-lib-panic/Makefile +++ b/tests/run-make/c-unwind-abi-catch-lib-panic/Makefile @@ -1,4 +1,5 @@ # ignore-cross-compile +# needs-unwind include ../tools.mk all: archive diff --git a/tests/run-make/c-unwind-abi-catch-panic/Makefile b/tests/run-make/c-unwind-abi-catch-panic/Makefile index 4398ac2ee24c..1760ddb30616 100644 --- a/tests/run-make/c-unwind-abi-catch-panic/Makefile +++ b/tests/run-make/c-unwind-abi-catch-panic/Makefile @@ -1,4 +1,5 @@ # ignore-cross-compile +# needs-unwind include ../tools.mk all: $(call NATIVE_STATICLIB,add) diff --git a/tests/run-make/const_fn_mir/Makefile b/tests/run-make/const_fn_mir/Makefile index b2c268f04396..6d72c1227230 100644 --- a/tests/run-make/const_fn_mir/Makefile +++ b/tests/run-make/const_fn_mir/Makefile @@ -1,3 +1,4 @@ +# needs-unwind -Cpanic=abort gives different MIR output include ../tools.mk all: diff --git a/tests/run-make/debug-assertions/Makefile b/tests/run-make/debug-assertions/Makefile index e83337c597f5..4501459e9d1d 100644 --- a/tests/run-make/debug-assertions/Makefile +++ b/tests/run-make/debug-assertions/Makefile @@ -1,4 +1,5 @@ # ignore-cross-compile +# needs-unwind include ../tools.mk all: diff --git a/tests/run-make/foreign-double-unwind/Makefile b/tests/run-make/foreign-double-unwind/Makefile index f20fe3ce66e8..b5e52808d2fc 100644 --- a/tests/run-make/foreign-double-unwind/Makefile +++ b/tests/run-make/foreign-double-unwind/Makefile @@ -1,4 +1,5 @@ # ignore-cross-compile +# needs-unwind include ../tools.mk all: foo diff --git a/tests/run-make/foreign-exceptions/Makefile b/tests/run-make/foreign-exceptions/Makefile index a8e20ffb1f49..56c41b274fb2 100644 --- a/tests/run-make/foreign-exceptions/Makefile +++ b/tests/run-make/foreign-exceptions/Makefile @@ -1,4 +1,5 @@ # ignore-cross-compile +# needs-unwind include ../tools.mk all: foo diff --git a/tests/run-make/foreign-rust-exceptions/Makefile b/tests/run-make/foreign-rust-exceptions/Makefile index 0d007bf1c49a..59cee2842004 100644 --- a/tests/run-make/foreign-rust-exceptions/Makefile +++ b/tests/run-make/foreign-rust-exceptions/Makefile @@ -1,5 +1,6 @@ # ignore-cross-compile # ignore-i686-pc-windows-gnu +# needs-unwind # This test doesn't work on 32-bit MinGW as cdylib has its own copy of unwinder # so cross-DLL unwinding does not work. diff --git a/tests/run-make/libtest-json/Makefile b/tests/run-make/libtest-json/Makefile index 417637cf0727..c8bc7b5dd4a4 100644 --- a/tests/run-make/libtest-json/Makefile +++ b/tests/run-make/libtest-json/Makefile @@ -1,4 +1,5 @@ # ignore-cross-compile +# needs-unwind include ../tools.mk # Test expected libtest's JSON output diff --git a/tests/run-make/static-unwinding/Makefile b/tests/run-make/static-unwinding/Makefile index dec94fb16f40..4b093f936086 100644 --- a/tests/run-make/static-unwinding/Makefile +++ b/tests/run-make/static-unwinding/Makefile @@ -1,4 +1,5 @@ # ignore-cross-compile +# needs-unwind include ../tools.mk all: diff --git a/tests/run-make/test-benches/Makefile b/tests/run-make/test-benches/Makefile index 0253a52637f6..11aed2e4c79a 100644 --- a/tests/run-make/test-benches/Makefile +++ b/tests/run-make/test-benches/Makefile @@ -1,6 +1,7 @@ include ../tools.mk # ignore-cross-compile +# needs-unwind #[bench] and -Zpanic-abort-tests can't be combined all: # Smoke-test that `#[bench]` isn't entirely broken. diff --git a/tests/ui/test-attrs/test-type.rs b/tests/ui/test-attrs/test-type.rs index f99e476eabae..8416270fd815 100644 --- a/tests/ui/test-attrs/test-type.rs +++ b/tests/ui/test-attrs/test-type.rs @@ -3,6 +3,7 @@ // check-run-results // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" // ignore-emscripten no threads support +// needs-unwind // run-pass #[test]