Skip to content

Commit

Permalink
tests: use needs-threads instead of ignore-emscripten
Browse files Browse the repository at this point in the history
  • Loading branch information
jieyouxu committed Jan 23, 2025
1 parent f626175 commit b3f4819
Show file tree
Hide file tree
Showing 29 changed files with 32 additions and 34 deletions.
4 changes: 2 additions & 2 deletions tests/ui/array-slice-vec/box-of-array-of-drop-1.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//@ run-pass
//@ needs-unwind
//@ needs-threads

#![allow(overflowing_literals)]

// Test that we cleanup a fixed size Box<[D; k]> properly when D has a
// destructor.

//@ ignore-emscripten no threads support

use std::thread;
use std::sync::atomic::{AtomicUsize, Ordering};

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/array-slice-vec/box-of-array-of-drop-2.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//@ run-pass
//@ needs-unwind
//@ needs-threads

#![allow(overflowing_literals)]

// Test that we cleanup dynamic sized Box<[D]> properly when D has a
// destructor.

//@ ignore-emscripten no threads support

use std::thread;
use std::sync::atomic::{AtomicUsize, Ordering};

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/array-slice-vec/nested-vec-3.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//@ run-pass
//@ needs-unwind
#![allow(overflowing_literals)]
//@ needs-threads

//@ ignore-emscripten no threads support
#![allow(overflowing_literals)]

// Test that using the `vec!` macro nested within itself works when
// the contents implement Drop and we hit a panic in the middle of
Expand Down
3 changes: 1 addition & 2 deletions tests/ui/array-slice-vec/slice-panic-1.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ run-pass
//@ needs-unwind

//@ ignore-emscripten no threads support
//@ needs-threads

// Test that if a slicing expr[..] fails, the correct cleanups happen.

Expand Down
3 changes: 1 addition & 2 deletions tests/ui/array-slice-vec/slice-panic-2.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ run-pass
//@ needs-unwind

//@ ignore-emscripten no threads support
//@ needs-threads

// Test that if a slicing expr[..] fails, the correct cleanups happen.

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/box/unit/unwind-unique.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-pass
//@ needs-unwind
//@ ignore-emscripten no threads support
//@ needs-threads

use std::thread;

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/cleanup-rvalue-temp-during-incomplete-alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// It's unclear how likely such a bug is to recur, but it seems like a
// scenario worth testing.

//@ ignore-emscripten no threads support
//@ needs-threads

use std::thread;

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/drop/drop-trait-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#![allow(dead_code)]
#![allow(unused_assignments)]
#![allow(unused_variables)]
//@ ignore-emscripten no threads support
//@ needs-threads
//@ needs-unwind

use std::thread;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/drop/terminate-in-initializer.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-pass
//@ needs-unwind
//@ ignore-emscripten no threads support
//@ needs-threads

// Issue #787
// Don't try to clean up uninitialized locals
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-pass
//@ needs-unwind
//@ ignore-emscripten no threads support
//@ needs-threads

// rust-lang/rust#64655: with panic=unwind, a panic from a subroutine
// should still run destructors as it unwinds the stack. However,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-pass
//@ needs-unwind
//@ ignore-emscripten no threads support
//@ needs-threads

// rust-lang/rust#64655: with panic=unwind, a panic from a subroutine
// should still run destructors as it unwinds the stack. However,
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-25089.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-pass
//@ needs-unwind
//@ ignore-emscripten no threads support
//@ needs-threads

use std::thread;

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-26655.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-pass
//@ needs-unwind
//@ ignore-emscripten no threads support
//@ needs-threads

// Check that the destructors of simple enums are run on unwinding

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-29485.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#![allow(unused_attributes)]
//@ aux-build:issue-29485.rs
//@ needs-unwind
//@ ignore-emscripten no threads
//@ needs-threads

#[feature(recover)]

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-30018-panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// SIGTRAP injected by the drop-flag consistency checking.

//@ needs-unwind
//@ ignore-emscripten no threads support
//@ needs-threads

struct Foo;

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-38763.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@ run-pass
//@ ignore-emscripten
//@ needs-threads

#[repr(C)]
pub struct Foo(i128);
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/numbers-arithmetic/int-abs-overflow.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-pass
//@ compile-flags: -C overflow-checks=on
//@ ignore-emscripten no threads support
//@ needs-threads
//@ needs-unwind

use std::thread;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/numbers-arithmetic/issue-8460.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-pass
#![allow(unused_must_use)]
//@ ignore-emscripten no threads support
//@ needs-threads
//@ needs-unwind
#![feature(rustc_attrs)]

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/panics/panic-handler-chain-update-hook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//@ needs-unwind
#![allow(stable_features)]

//@ ignore-emscripten no threads support
//@ needs-threads

#![feature(std_panic)]
#![feature(panic_update_hook)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/panics/panic-handler-flail-wildly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#![allow(stable_features)]
#![allow(unused_must_use)]

//@ ignore-emscripten no threads support
//@ needs-threads

#![feature(std_panic)]

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/panics/panic-handler-set-twice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#![feature(std_panic)]

//@ ignore-emscripten no threads support
//@ needs-threads

use std::sync::atomic::{AtomicUsize, Ordering};
use std::panic;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/panics/panic-in-dtor-drops-fields.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#![allow(dead_code)]
#![allow(non_upper_case_globals)]

//@ ignore-emscripten no threads support
//@ needs-threads

use std::thread;

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/panics/panic-recover-propagate.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-pass
//@ needs-unwind
//@ ignore-emscripten no threads support
//@ needs-threads

use std::sync::atomic::{AtomicUsize, Ordering};
use std::panic;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/process/process-sigpipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

//@ ignore-vxworks no 'sh'
//@ ignore-fuchsia no 'sh'
//@ ignore-emscripten No threads
//@ needs-threads
//@ only-unix SIGPIPE is a unix feature

use std::process;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/sepcomp/sepcomp-unwind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//@ needs-unwind
#![allow(dead_code)]
//@ compile-flags: -C codegen-units=3
//@ ignore-emscripten no threads support
//@ needs-threads

// Test unwinding through multiple compilation units.

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/structs-enums/unit-like-struct-drop-run.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-pass
//@ needs-unwind
//@ ignore-emscripten no threads support
//@ needs-threads

// Make sure the destructor is run for unit-like structs.

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/test-attrs/terse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//@ check-run-results
//@ exec-env:RUST_BACKTRACE=0
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ ignore-emscripten no threads support
//@ needs-threads
//@ needs-unwind

#[test]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/test-attrs/test-thread-capture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//@ check-run-results
//@ exec-env:RUST_BACKTRACE=0
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ ignore-emscripten no threads support
//@ needs-threads
//@ needs-unwind

#[test]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/test-attrs/test-thread-nocapture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//@ check-run-results
//@ exec-env:RUST_BACKTRACE=0
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ ignore-emscripten no threads support
//@ needs-threads
//@ needs-unwind

#[test]
Expand Down

0 comments on commit b3f4819

Please sign in to comment.