From 5f0b677b86204c4cd98cf51b33b7224340406719 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Tue, 23 May 2023 15:20:57 +0200 Subject: [PATCH] codegen: add needs-unwind to tests that require it --- tests/codegen/drop.rs | 1 + tests/codegen/personality_lifetimes.rs | 1 + tests/codegen/unwind-abis/c-unwind-abi.rs | 1 + tests/codegen/unwind-abis/cdecl-unwind-abi.rs | 1 + tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs | 1 + tests/codegen/unwind-abis/system-unwind-abi.rs | 1 + tests/codegen/unwind-extern-exports.rs | 1 + tests/codegen/unwind-extern-imports.rs | 1 + tests/codegen/vec-shrink-panik.rs | 1 + 9 files changed, 9 insertions(+) diff --git a/tests/codegen/drop.rs b/tests/codegen/drop.rs index 99402827158..3615ef47b53 100644 --- a/tests/codegen/drop.rs +++ b/tests/codegen/drop.rs @@ -1,4 +1,5 @@ // ignore-wasm32-bare compiled with panic=abort by default +// needs-unwind - this test verifies the amount of drop calls when unwinding is used // compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/personality_lifetimes.rs b/tests/codegen/personality_lifetimes.rs index 2104022f578..9ff7a9b3e88 100644 --- a/tests/codegen/personality_lifetimes.rs +++ b/tests/codegen/personality_lifetimes.rs @@ -1,5 +1,6 @@ // ignore-msvc // ignore-wasm32-bare compiled with panic=abort by default +// needs-unwind // compile-flags: -O -C no-prepopulate-passes diff --git a/tests/codegen/unwind-abis/c-unwind-abi.rs b/tests/codegen/unwind-abis/c-unwind-abi.rs index e258dbcacd2..fa5b6bad75c 100644 --- a/tests/codegen/unwind-abis/c-unwind-abi.rs +++ b/tests/codegen/unwind-abis/c-unwind-abi.rs @@ -1,4 +1,5 @@ // compile-flags: -C opt-level=0 +// needs-unwind // Test that `nounwind` attributes are correctly applied to exported `C` and `C-unwind` extern // functions. `C-unwind` functions MUST NOT have this attribute. We disable optimizations above diff --git a/tests/codegen/unwind-abis/cdecl-unwind-abi.rs b/tests/codegen/unwind-abis/cdecl-unwind-abi.rs index 19a7228839a..64746d32175 100644 --- a/tests/codegen/unwind-abis/cdecl-unwind-abi.rs +++ b/tests/codegen/unwind-abis/cdecl-unwind-abi.rs @@ -1,4 +1,5 @@ // compile-flags: -C opt-level=0 +// needs-unwind // Test that `nounwind` attributes are correctly applied to exported `cdecl` and // `cdecl-unwind` extern functions. `cdecl-unwind` functions MUST NOT have this attribute. We diff --git a/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs b/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs index c1c5bbdda34..dc3911cd4eb 100644 --- a/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs +++ b/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs @@ -1,5 +1,6 @@ // compile-flags: -C opt-level=0 // ignore-wasm32-bare compiled with panic=abort by default +// needs-unwind #![crate_type = "lib"] diff --git a/tests/codegen/unwind-abis/system-unwind-abi.rs b/tests/codegen/unwind-abis/system-unwind-abi.rs index 2591c1d4814..f274a33b099 100644 --- a/tests/codegen/unwind-abis/system-unwind-abi.rs +++ b/tests/codegen/unwind-abis/system-unwind-abi.rs @@ -1,4 +1,5 @@ // compile-flags: -C opt-level=0 +// needs-unwind // Test that `nounwind` attributes are correctly applied to exported `system` and `system-unwind` // extern functions. `system-unwind` functions MUST NOT have this attribute. We disable diff --git a/tests/codegen/unwind-extern-exports.rs b/tests/codegen/unwind-extern-exports.rs index 6ac3c079f81..4e1e719d5cd 100644 --- a/tests/codegen/unwind-extern-exports.rs +++ b/tests/codegen/unwind-extern-exports.rs @@ -1,5 +1,6 @@ // compile-flags: -C opt-level=0 // ignore-wasm32-bare compiled with panic=abort by default +// needs-unwind #![crate_type = "lib"] #![feature(c_unwind)] diff --git a/tests/codegen/unwind-extern-imports.rs b/tests/codegen/unwind-extern-imports.rs index e33e3e80521..260dcc628cc 100644 --- a/tests/codegen/unwind-extern-imports.rs +++ b/tests/codegen/unwind-extern-imports.rs @@ -1,5 +1,6 @@ // compile-flags: -C no-prepopulate-passes // ignore-wasm32-bare compiled with panic=abort by default +// needs-unwind #![crate_type = "lib"] #![feature(c_unwind)] diff --git a/tests/codegen/vec-shrink-panik.rs b/tests/codegen/vec-shrink-panik.rs index 88b7edff260..606d68ff3ab 100644 --- a/tests/codegen/vec-shrink-panik.rs +++ b/tests/codegen/vec-shrink-panik.rs @@ -5,6 +5,7 @@ // [new]min-llvm-version: 17 // compile-flags: -O // ignore-debug: the debug assertions get in the way +// needs-unwind #![crate_type = "lib"] #![feature(shrink_to)]