From 3733dcc72d3b8504ab812990b30e17bd5f0afd5b Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Mon, 25 Mar 2024 14:19:07 +0000 Subject: [PATCH] Add needs-unwind annotations to a couple of tests --- .../rustc_codegen_cranelift/scripts/test_rustc_tests.sh | 6 ------ tests/run-make/libtest-junit/Makefile | 1 + tests/ui/asm/may_unwind.rs | 1 + tests/ui/stable-mir-print/basic_function.rs | 1 + 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh b/compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh index 9b360fb30362..7f47fd972c44 100755 --- a/compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh +++ b/compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh @@ -41,12 +41,6 @@ rm tests/ui/parser/unclosed-delimiter-in-dep.rs # submodule contains //~ERROR # missing features # ================ -# requires stack unwinding -# FIXME add needs-unwind to these tests -rm -r tests/run-make/libtest-junit -rm tests/ui/asm/may_unwind.rs -rm tests/ui/stable-mir-print/basic_function.rs - # extra warning about -Cpanic=abort for proc macros rm tests/ui/proc-macro/crt-static.rs rm tests/ui/proc-macro/proc-macro-deprecated-attr.rs diff --git a/tests/run-make/libtest-junit/Makefile b/tests/run-make/libtest-junit/Makefile index d97cafccf1fd..26e56242dd23 100644 --- a/tests/run-make/libtest-junit/Makefile +++ b/tests/run-make/libtest-junit/Makefile @@ -1,4 +1,5 @@ # ignore-cross-compile +# needs-unwind contains should_panic test include ../tools.mk # Test expected libtest's junit output diff --git a/tests/ui/asm/may_unwind.rs b/tests/ui/asm/may_unwind.rs index 216408b38733..1d4f50d5fe89 100644 --- a/tests/ui/asm/may_unwind.rs +++ b/tests/ui/asm/may_unwind.rs @@ -1,5 +1,6 @@ //@ run-pass //@ needs-asm-support +//@ needs-unwind #![feature(asm_unwind)] diff --git a/tests/ui/stable-mir-print/basic_function.rs b/tests/ui/stable-mir-print/basic_function.rs index deefef63bdb6..5f582ece6fb4 100644 --- a/tests/ui/stable-mir-print/basic_function.rs +++ b/tests/ui/stable-mir-print/basic_function.rs @@ -1,6 +1,7 @@ //@ compile-flags: -Z unpretty=stable-mir -Z mir-opt-level=3 //@ check-pass //@ only-x86_64 +//@ needs-unwind unwind edges are different with panic=abort fn foo(i: i32) -> i32 { i + 1