1
Fork 0

tests: use needs-threads instead of ignore-emscripten

This commit is contained in:
许杰友 Jieyou Xu (Joe) 2025-01-23 17:05:01 +08:00
parent 8a0310a0b1
commit 071ad3795c
29 changed files with 32 additions and 34 deletions

View file

@ -1,12 +1,12 @@
//@ run-pass //@ run-pass
//@ needs-unwind //@ needs-unwind
//@ needs-threads
#![allow(overflowing_literals)] #![allow(overflowing_literals)]
// Test that we cleanup a fixed size Box<[D; k]> properly when D has a // Test that we cleanup a fixed size Box<[D; k]> properly when D has a
// destructor. // destructor.
//@ ignore-emscripten no threads support
use std::thread; use std::thread;
use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::atomic::{AtomicUsize, Ordering};

View file

@ -1,12 +1,12 @@
//@ run-pass //@ run-pass
//@ needs-unwind //@ needs-unwind
//@ needs-threads
#![allow(overflowing_literals)] #![allow(overflowing_literals)]
// Test that we cleanup dynamic sized Box<[D]> properly when D has a // Test that we cleanup dynamic sized Box<[D]> properly when D has a
// destructor. // destructor.
//@ ignore-emscripten no threads support
use std::thread; use std::thread;
use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::atomic::{AtomicUsize, Ordering};

View file

@ -1,8 +1,8 @@
//@ run-pass //@ run-pass
//@ needs-unwind //@ 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 // Test that using the `vec!` macro nested within itself works when
// the contents implement Drop and we hit a panic in the middle of // the contents implement Drop and we hit a panic in the middle of

View file

@ -1,7 +1,6 @@
//@ run-pass //@ run-pass
//@ needs-unwind //@ needs-unwind
//@ needs-threads
//@ ignore-emscripten no threads support
// Test that if a slicing expr[..] fails, the correct cleanups happen. // Test that if a slicing expr[..] fails, the correct cleanups happen.

View file

@ -1,7 +1,6 @@
//@ run-pass //@ run-pass
//@ needs-unwind //@ needs-unwind
//@ needs-threads
//@ ignore-emscripten no threads support
// Test that if a slicing expr[..] fails, the correct cleanups happen. // Test that if a slicing expr[..] fails, the correct cleanups happen.

View file

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

View file

@ -20,7 +20,7 @@
// It's unclear how likely such a bug is to recur, but it seems like a // It's unclear how likely such a bug is to recur, but it seems like a
// scenario worth testing. // scenario worth testing.
//@ ignore-emscripten no threads support //@ needs-threads
use std::thread; use std::thread;

View file

@ -2,7 +2,7 @@
#![allow(dead_code)] #![allow(dead_code)]
#![allow(unused_assignments)] #![allow(unused_assignments)]
#![allow(unused_variables)] #![allow(unused_variables)]
//@ ignore-emscripten no threads support //@ needs-threads
//@ needs-unwind //@ needs-unwind
use std::thread; use std::thread;

View file

@ -1,6 +1,6 @@
//@ run-pass //@ run-pass
//@ needs-unwind //@ needs-unwind
//@ ignore-emscripten no threads support //@ needs-threads
// Issue #787 // Issue #787
// Don't try to clean up uninitialized locals // Don't try to clean up uninitialized locals

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -5,7 +5,7 @@
// SIGTRAP injected by the drop-flag consistency checking. // SIGTRAP injected by the drop-flag consistency checking.
//@ needs-unwind //@ needs-unwind
//@ ignore-emscripten no threads support //@ needs-threads
struct Foo; struct Foo;

View file

@ -1,5 +1,5 @@
//@ run-pass //@ run-pass
//@ ignore-emscripten //@ needs-threads
#[repr(C)] #[repr(C)]
pub struct Foo(i128); pub struct Foo(i128);

View file

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

View file

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

View file

@ -2,7 +2,7 @@
//@ needs-unwind //@ needs-unwind
#![allow(stable_features)] #![allow(stable_features)]
//@ ignore-emscripten no threads support //@ needs-threads
#![feature(std_panic)] #![feature(std_panic)]
#![feature(panic_update_hook)] #![feature(panic_update_hook)]

View file

@ -4,7 +4,7 @@
#![allow(stable_features)] #![allow(stable_features)]
#![allow(unused_must_use)] #![allow(unused_must_use)]
//@ ignore-emscripten no threads support //@ needs-threads
#![feature(std_panic)] #![feature(std_panic)]

View file

@ -5,7 +5,7 @@
#![feature(std_panic)] #![feature(std_panic)]
//@ ignore-emscripten no threads support //@ needs-threads
use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::atomic::{AtomicUsize, Ordering};
use std::panic; use std::panic;

View file

@ -3,7 +3,7 @@
#![allow(dead_code)] #![allow(dead_code)]
#![allow(non_upper_case_globals)] #![allow(non_upper_case_globals)]
//@ ignore-emscripten no threads support //@ needs-threads
use std::thread; use std::thread;

View file

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

View file

@ -15,7 +15,7 @@
//@ ignore-vxworks no 'sh' //@ ignore-vxworks no 'sh'
//@ ignore-fuchsia no 'sh' //@ ignore-fuchsia no 'sh'
//@ ignore-emscripten No threads //@ needs-threads
//@ only-unix SIGPIPE is a unix feature //@ only-unix SIGPIPE is a unix feature
use std::process; use std::process;

View file

@ -2,7 +2,7 @@
//@ needs-unwind //@ needs-unwind
#![allow(dead_code)] #![allow(dead_code)]
//@ compile-flags: -C codegen-units=3 //@ compile-flags: -C codegen-units=3
//@ ignore-emscripten no threads support //@ needs-threads
// Test unwinding through multiple compilation units. // Test unwinding through multiple compilation units.

View file

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

View file

@ -4,7 +4,7 @@
//@ check-run-results //@ check-run-results
//@ exec-env:RUST_BACKTRACE=0 //@ exec-env:RUST_BACKTRACE=0
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ ignore-emscripten no threads support //@ needs-threads
//@ needs-unwind //@ needs-unwind
#[test] #[test]

View file

@ -4,7 +4,7 @@
//@ check-run-results //@ check-run-results
//@ exec-env:RUST_BACKTRACE=0 //@ exec-env:RUST_BACKTRACE=0
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ ignore-emscripten no threads support //@ needs-threads
//@ needs-unwind //@ needs-unwind
#[test] #[test]

View file

@ -4,7 +4,7 @@
//@ check-run-results //@ check-run-results
//@ exec-env:RUST_BACKTRACE=0 //@ exec-env:RUST_BACKTRACE=0
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ ignore-emscripten no threads support //@ needs-threads
//@ needs-unwind //@ needs-unwind
#[test] #[test]