Rollup merge of #91373 - djkoloski:fuchsia_test_suite, r=Mark-Simulacrum
Add needs-unwind to tests that depend on panicking These tests were found by running the test suite on fuchsia which compiles with `panic=abort` by default, then picking through the failures manually to locate the tests that require unwinding support. Most of these tests are already opted-out on platforms that compile with `panic=abort` by default. This just generalizes it a bit more so that fuchsia tests can be run properly. Currently, the `needs-unwind` directive needs to be manually passed to compiletest (e.g. via `--test-args '--target-panic=abort'`). Eventually, I would like `x.py` or compiletest to determine whether the directive should be used automatically based on the target panic settings.
This commit is contained in:
commit
f7278cfc3c
62 changed files with 63 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
#![allow(overflowing_literals)]
|
||||
|
||||
// Test that we cleanup a fixed size Box<[D; k]> properly when D has a
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
#![allow(overflowing_literals)]
|
||||
|
||||
// Test that we cleanup dynamic sized Box<[D]> properly when D has a
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
#![allow(overflowing_literals)]
|
||||
|
||||
// ignore-emscripten no threads support
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
|
||||
// ignore-emscripten no threads support
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
|
||||
// ignore-emscripten no threads support
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// be talking about `async fn`s instead. Should also test what happens when it panics.
|
||||
|
||||
// run-fail
|
||||
// needs-unwind
|
||||
// error-pattern: thread 'main' panicked at '`async fn` resumed after panicking'
|
||||
// edition:2018
|
||||
// ignore-wasm no panic or subprocess support
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// Check that partially moved from function parameters are dropped after the
|
||||
// named bindings that move from them.
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
|
||||
#![allow(unused_variables)]
|
||||
#![allow(unused_imports)]
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
|
||||
fn worker() -> ! {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
|
||||
#![allow(unused_must_use)]
|
||||
#![allow(dead_code)]
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-rustfix
|
||||
// needs-unwind
|
||||
|
||||
#![deny(rust_2021_incompatible_closure_captures)]
|
||||
//~^ NOTE: the lint level is defined here
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-rustfix
|
||||
// needs-unwind
|
||||
|
||||
#![deny(rust_2021_incompatible_closure_captures)]
|
||||
//~^ NOTE: the lint level is defined here
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: changes to closure capture in Rust 2021 will affect which traits the closure implements
|
||||
--> $DIR/mir_calls_to_shims.rs:20:38
|
||||
--> $DIR/mir_calls_to_shims.rs:21:38
|
||||
|
|
||||
LL | let result = panic::catch_unwind(move || {
|
||||
| ^^^^^^^
|
||||
|
@ -11,7 +11,7 @@ LL | f.0()
|
|||
| --- in Rust 2018, this closure captures all of `f`, but in Rust 2021, it will only capture `f.0`
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/mir_calls_to_shims.rs:3:9
|
||||
--> $DIR/mir_calls_to_shims.rs:4:9
|
||||
|
|
||||
LL | #![deny(rust_2021_incompatible_closure_captures)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#![allow(unused_assignments)]
|
||||
#![allow(unused_variables)]
|
||||
// ignore-emscripten no threads support
|
||||
// needs-unwind
|
||||
|
||||
use std::thread;
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
// * Dropping one of the values panics while dropping the future.
|
||||
|
||||
// run-pass
|
||||
// needs-unwind
|
||||
// edition:2018
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
|
||||
#![feature(generators, generator_trait)]
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-emscripten no threads support
|
||||
|
||||
// Issue #787
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// ignore-emscripten no threads support
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// ignore-emscripten no threads support
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-fail
|
||||
// needs-unwind
|
||||
// error-pattern:generator resumed after panicking
|
||||
// ignore-emscripten no processes
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
//! Tests that panics inside a generator will correctly drop the initial resume argument.
|
||||
|
||||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-wasm no unwind support
|
||||
// ignore-emscripten no unwind support
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// revisions: mir thir
|
||||
// [thir]compile-flags: -Zthir-unsafeck
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
|
||||
// Check that values are not leaked when a dtor panics (#14875)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-emscripten no threads support
|
||||
|
||||
use std::thread;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-emscripten no threads support
|
||||
|
||||
// Check that the destructors of simple enums are run on unwinding
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// run-pass
|
||||
#![allow(unused_attributes)]
|
||||
// aux-build:issue-29485.rs
|
||||
// needs-unwind
|
||||
// ignore-emscripten no threads
|
||||
|
||||
#[feature(recover)]
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
|
||||
use std::panic;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
// spawned thread to isolate the expected error result from the
|
||||
// SIGTRAP injected by the drop-flag consistency checking.
|
||||
|
||||
// needs-unwind
|
||||
// ignore-emscripten no threads support
|
||||
|
||||
struct Foo;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
|
||||
use std::panic;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// run-pass
|
||||
// compile-flags:--test -O
|
||||
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// run-pass
|
||||
// only-32bit too impatient for 2⁶⁴ items
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// compile-flags: -C debug_assertions=yes -C opt-level=3
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// run-pass
|
||||
// only-32bit too impatient for 2⁶⁴ items
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// compile-flags: -C debug_assertions=yes -C opt-level=3
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// compile-flags: -C debug_assertions=yes
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// compile-flags: -C debug_assertions=yes
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// compile-flags: -C overflow-checks
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
#![allow(unused_imports)]
|
||||
// Ideally, any macro call with a trailing comma should behave
|
||||
// identically to a call without the comma.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
|
||||
#![feature(fn_traits)]
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
|
||||
use std::cell::RefCell;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-fail
|
||||
// needs-unwind
|
||||
// error-pattern:panic 1
|
||||
// error-pattern:drop 2
|
||||
// ignore-emscripten no processes
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-fail
|
||||
// needs-unwind
|
||||
// error-pattern:unwind happens
|
||||
// error-pattern:drop 3
|
||||
// error-pattern:drop 2
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// run-pass
|
||||
// compile-flags: -C overflow-checks=on
|
||||
// ignore-emscripten no threads support
|
||||
// needs-unwind
|
||||
|
||||
use std::thread;
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// run-pass
|
||||
// compile-flags: -C debug_assertions=yes
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// ignore-emscripten dies with an LLVM error
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
#![allow(stable_features)]
|
||||
|
||||
// ignore-emscripten no threads support
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
|
||||
#![allow(stable_features)]
|
||||
#![allow(unused_must_use)]
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
#![allow(unused_variables)]
|
||||
#![allow(stable_features)]
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
#![allow(dead_code)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-emscripten no threads support
|
||||
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// run-pass
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// needs-unwind
|
||||
// aux-build:reachable-unnameable-items.rs
|
||||
|
||||
extern crate reachable_unnameable_items;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// aux-build:expand-with-a-macro.rs
|
||||
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// compile-flags: --test
|
||||
// run-pass
|
||||
// needs-unwind
|
||||
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// revisions: default mir-opt
|
||||
//[mir-opt] compile-flags: -Zmir-opt-level=4
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
|
||||
#![allow(dead_code, unreachable_code)]
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-emscripten no processes
|
||||
// ignore-sgx no processes
|
||||
// ignore-wasm32-bare no unwinding panic
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
#![allow(dead_code)]
|
||||
// compile-flags: -C codegen-units=3
|
||||
// ignore-emscripten no threads support
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-emscripten no threads support
|
||||
|
||||
// Make sure the destructor is run for unit-like structs.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// compile-flags: --test
|
||||
#[test]
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// run-pass
|
||||
// ignore-emscripten no threads support
|
||||
// needs-unwind
|
||||
|
||||
#![feature(internal_output_capture)]
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
|
||||
#![allow(non_camel_case_types)]
|
||||
// ignore-emscripten no threads support
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-emscripten no threads support
|
||||
|
||||
use std::thread;
|
||||
|
|
Loading…
Add table
Reference in a new issue