Add needs-unwind to tests that depend on panicking

This directive isn't automatically set by compiletest or x.py, but can
be turned on manually for targets that require it.
This commit is contained in:
David Koloski 2021-12-03 15:32:51 +00:00
parent 0b42deaccc
commit ea68758299
62 changed files with 63 additions and 2 deletions

View file

@ -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

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
#![allow(overflowing_literals)]
// Test that we cleanup dynamic sized Box<[D]> properly when D has a

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
#![allow(overflowing_literals)]
// ignore-emscripten no threads support

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-emscripten no threads support

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-emscripten no threads support

View file

@ -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

View file

@ -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.

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
#![allow(unused_variables)]
#![allow(unused_imports)]

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default
fn worker() -> ! {

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
#![allow(unused_must_use)]
#![allow(dead_code)]

View file

@ -1,4 +1,5 @@
// run-rustfix
// needs-unwind
#![deny(rust_2021_incompatible_closure_captures)]
//~^ NOTE: the lint level is defined here

View file

@ -1,4 +1,5 @@
// run-rustfix
// needs-unwind
#![deny(rust_2021_incompatible_closure_captures)]
//~^ NOTE: the lint level is defined here

View file

@ -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)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -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};

View file

@ -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

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default
#![feature(generators, generator_trait)]

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-emscripten no threads support
// Issue #787

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default
// ignore-emscripten no threads support

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default
// ignore-emscripten no threads support

View file

@ -1,4 +1,5 @@
// run-fail
// needs-unwind
// error-pattern:generator resumed after panicking
// ignore-emscripten no processes

View file

@ -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

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default

View file

@ -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

View file

@ -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)

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-emscripten no threads support
use std::thread;

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-emscripten no threads support
// Check that the destructors of simple enums are run on unwinding

View file

@ -1,6 +1,7 @@
// run-pass
#![allow(unused_attributes)]
// aux-build:issue-29485.rs
// needs-unwind
// ignore-emscripten no threads
#[feature(recover)]

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default
use std::panic;

View file

@ -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;

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default
use std::panic;

View file

@ -1,6 +1,7 @@
// run-pass
// compile-flags:--test -O
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default
#[test]

View file

@ -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

View file

@ -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

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default
// compile-flags: -C debug_assertions=yes

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default
// compile-flags: -C debug_assertions=yes

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default
// compile-flags: -C overflow-checks

View file

@ -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.

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default
#![feature(fn_traits)]

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default
use std::cell::RefCell;

View file

@ -1,4 +1,5 @@
// run-fail
// needs-unwind
// error-pattern:panic 1
// error-pattern:drop 2
// ignore-emscripten no processes

View file

@ -1,4 +1,5 @@
// run-fail
// needs-unwind
// error-pattern:unwind happens
// error-pattern:drop 3
// error-pattern:drop 2

View file

@ -1,6 +1,7 @@
// run-pass
// compile-flags: -C overflow-checks=on
// ignore-emscripten no threads support
// needs-unwind
use std::thread;

View file

@ -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

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
#![allow(stable_features)]
// ignore-emscripten no threads support

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
#![allow(stable_features)]
#![allow(unused_must_use)]

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
#![allow(unused_variables)]
#![allow(stable_features)]

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
#![allow(dead_code)]
#![allow(non_upper_case_globals)]

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-emscripten no threads support
use std::sync::atomic::{AtomicUsize, Ordering};

View file

@ -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;

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// aux-build:expand-with-a-macro.rs
// ignore-wasm32-bare compiled with panic=abort by default

View file

@ -1,5 +1,6 @@
// compile-flags: --test
// run-pass
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default

View file

@ -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

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default
#![allow(dead_code, unreachable_code)]

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-emscripten no processes
// ignore-sgx no processes
// ignore-wasm32-bare no unwinding panic

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
#![allow(dead_code)]
// compile-flags: -C codegen-units=3
// ignore-emscripten no threads support

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-emscripten no threads support
// Make sure the destructor is run for unit-like structs.

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default
// compile-flags: --test
#[test]

View file

@ -1,5 +1,6 @@
// run-pass
// ignore-emscripten no threads support
// needs-unwind
#![feature(internal_output_capture)]

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
#![allow(non_camel_case_types)]
// ignore-emscripten no threads support

View file

@ -1,4 +1,5 @@
// run-pass
// needs-unwind
// ignore-emscripten no threads support
use std::thread;