From e7ea063622d4a150fb22030b78d21b18f4855481 Mon Sep 17 00:00:00 2001 From: Oneirical Date: Tue, 18 Jun 2024 16:43:52 -0400 Subject: [PATCH] rewrite forced-unwind-terminate-pof to rmake --- .../tidy/src/allowed_run_make_makefiles.txt | 1 - .../forced-unwind-terminate-pof/Makefile | 9 --------- .../forced-unwind-terminate-pof/rmake.rs | 16 ++++++++++++++++ .../metadata-flag-frobs-symbols/rmake.rs | 1 - 4 files changed, 16 insertions(+), 11 deletions(-) delete mode 100644 tests/run-make/forced-unwind-terminate-pof/Makefile create mode 100644 tests/run-make/forced-unwind-terminate-pof/rmake.rs diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index 8eee16e87a8..a5ccb1b7842 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -51,7 +51,6 @@ run-make/extern-multiple-copies/Makefile run-make/extern-multiple-copies2/Makefile run-make/extra-filename-with-temp-outputs/Makefile run-make/fmt-write-bloat/Makefile -run-make/forced-unwind-terminate-pof/Makefile run-make/foreign-double-unwind/Makefile run-make/foreign-exceptions/Makefile run-make/foreign-rust-exceptions/Makefile diff --git a/tests/run-make/forced-unwind-terminate-pof/Makefile b/tests/run-make/forced-unwind-terminate-pof/Makefile deleted file mode 100644 index 871621520b9..00000000000 --- a/tests/run-make/forced-unwind-terminate-pof/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# ignore-cross-compile -# only-linux -include ../tools.mk - -all: foo - $(call RUN,foo) | $(CGREP) -v "cannot unwind" - -foo: foo.rs - $(RUSTC) $< diff --git a/tests/run-make/forced-unwind-terminate-pof/rmake.rs b/tests/run-make/forced-unwind-terminate-pof/rmake.rs new file mode 100644 index 00000000000..320ddb172b6 --- /dev/null +++ b/tests/run-make/forced-unwind-terminate-pof/rmake.rs @@ -0,0 +1,16 @@ +// During a forced unwind, crossing the non-Plain Old Frame +// would define the forced unwind as undefined behaviour, and +// immediately abort the unwinding process. This test checks +// that the forced unwinding takes precedence. +// See https://github.com/rust-lang/rust/issues/101469 + +//@ ignore-cross-compile +//@ ignore-windows +//Reason: pthread (POSIX threads) is not available on Windows + +use run_make_support::{run, rustc}; + +fn main() { + rustc().input("foo.rs").run(); + run("foo").assert_stdout_not_contains("cannot unwind"); +} diff --git a/tests/run-make/metadata-flag-frobs-symbols/rmake.rs b/tests/run-make/metadata-flag-frobs-symbols/rmake.rs index 12c07f9e3ae..938886957fb 100644 --- a/tests/run-make/metadata-flag-frobs-symbols/rmake.rs +++ b/tests/run-make/metadata-flag-frobs-symbols/rmake.rs @@ -15,7 +15,6 @@ fn main() { .input("bar.rs") .extern_("foo1", rust_lib_name("foo-a")) .extern_("foo2", rust_lib_name("foo-b")) - .print("link-args") .run(); run("bar"); }