diff --git a/src/doc/rustc-dev-guide/src/tests/directives.md b/src/doc/rustc-dev-guide/src/tests/directives.md index 426a6ff1da527..7366e55d3146d 100644 --- a/src/doc/rustc-dev-guide/src/tests/directives.md +++ b/src/doc/rustc-dev-guide/src/tests/directives.md @@ -94,7 +94,7 @@ for more details. | Directive | Explanation | Supported test suites | Possible values | |-----------------------------------|--------------------------------------------------------------------------------------------------------------------------|----------------------------------------------|-----------------------------------------------------------------------------------------| | `check-run-results` | Check run test binary `run-{pass,fail}` output snapshot | `ui`, `crashes`, `incremental` if `run-pass` | N/A | -| `error-pattern` | Check that output contains a specific string | `ui`, `crashes`, `incremental` if `run-pass` | String | +| `error-pattern` | Check that output contains a specific string | `ui`, `crashes`, `incremental` if `run-pass` | String | | `regex-error-pattern` | Check that output contains a regex pattern | `ui`, `crashes`, `incremental` if `run-pass` | Regex | | `check-stdout` | Check `stdout` against `error-pattern`s from running test binary[^check_stdout] | `ui`, `crashes`, `incremental` | N/A | | `normalize-stderr-32bit` | Normalize actual stderr (for 32-bit platforms) with a rule `"" -> ""` before comparing against snapshot | `ui`, `incremental` | `"" -> ""`, ``/`` is regex capture and replace syntax | @@ -176,6 +176,7 @@ settings: - `needs-rust-lld` — ignores if the rust lld support is not enabled (`rust.lld = true` in `config.toml`) - `needs-threads` — ignores if the target does not have threading support +- `needs-subprocess` — ignores if the target does not have subprocess support - `needs-symlink` — ignores if the target does not support symlinks. This can be the case on Windows if the developer did not enable privileged symlink permissions. diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs index c6f3d7c0d1080..00821fc9f9db2 100644 --- a/src/tools/compiletest/src/common.rs +++ b/src/tools/compiletest/src/common.rs @@ -488,6 +488,17 @@ impl Config { git_merge_commit_email: &self.git_merge_commit_email, } } + + pub fn has_subprocess_support(&self) -> bool { + // FIXME(#135928): compiletest is always a **host** tool. Building and running an + // capability detection executable against the **target** is not trivial. The short term + // solution here is to hard-code some targets to allow/deny, unfortunately. + + let unsupported_target = self.target_cfg().env == "sgx" + || matches!(self.target_cfg().arch.as_str(), "wasm32" | "wasm64") + || self.target_cfg().os == "emscripten"; + !unsupported_target + } } /// Known widths of `target_has_atomic`. diff --git a/src/tools/compiletest/src/directive-list.rs b/src/tools/compiletest/src/directive-list.rs index 5784cd831196e..acdb3cbdd4590 100644 --- a/src/tools/compiletest/src/directive-list.rs +++ b/src/tools/compiletest/src/directive-list.rs @@ -152,6 +152,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[ "needs-sanitizer-support", "needs-sanitizer-thread", "needs-std-debug-assertions", + "needs-subprocess", "needs-symlink", "needs-target-has-atomic", "needs-threads", diff --git a/src/tools/compiletest/src/header/needs.rs b/src/tools/compiletest/src/header/needs.rs index e19dcd992fc2e..12f0790fb1040 100644 --- a/src/tools/compiletest/src/header/needs.rs +++ b/src/tools/compiletest/src/header/needs.rs @@ -94,6 +94,11 @@ pub(super) fn handle_needs( condition: config.has_threads(), ignore_reason: "ignored on targets without threading support", }, + Need { + name: "needs-subprocess", + condition: config.has_subprocess_support(), + ignore_reason: "ignored on targets without subprocess support", + }, Need { name: "needs-unwind", condition: config.can_unwind(), @@ -351,6 +356,9 @@ fn find_dlltool(config: &Config) -> bool { dlltool_found } +// FIXME(#135928): this is actually not quite right because this detection is run on the **host**. +// This however still helps the case of windows -> windows local development in case symlinks are +// not available. #[cfg(windows)] fn has_symlinks() -> bool { if std::env::var_os("CI").is_some() { diff --git a/src/tools/tidy/src/issues.txt b/src/tools/tidy/src/issues.txt index 5878cce5ffbdd..0e5a7458b68c8 100644 --- a/src/tools/tidy/src/issues.txt +++ b/src/tools/tidy/src/issues.txt @@ -2204,7 +2204,6 @@ ui/issues/issue-3895.rs ui/issues/issue-38954.rs ui/issues/issue-38987.rs ui/issues/issue-39089.rs -ui/issues/issue-39175.rs ui/issues/issue-39211.rs ui/issues/issue-39367.rs ui/issues/issue-39548.rs diff --git a/src/tools/tidy/src/ui_tests.rs b/src/tools/tidy/src/ui_tests.rs index 63ac447a772ea..5ef07911429b0 100644 --- a/src/tools/tidy/src/ui_tests.rs +++ b/src/tools/tidy/src/ui_tests.rs @@ -17,7 +17,7 @@ use ignore::Walk; const ENTRY_LIMIT: u32 = 901; // FIXME: The following limits should be reduced eventually. -const ISSUES_ENTRY_LIMIT: u32 = 1664; +const ISSUES_ENTRY_LIMIT: u32 = 1662; const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[ "rs", // test source files diff --git a/tests/ui/abi/homogenous-floats-target-feature-mixup.rs b/tests/ui/abi/homogenous-floats-target-feature-mixup.rs index 4afb710b193eb..22b9b029a4049 100644 --- a/tests/ui/abi/homogenous-floats-target-feature-mixup.rs +++ b/tests/ui/abi/homogenous-floats-target-feature-mixup.rs @@ -5,8 +5,7 @@ // without #[repr(simd)] //@ run-pass -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess #![feature(avx512_target_feature)] diff --git a/tests/ui/abi/segfault-no-out-of-stack.rs b/tests/ui/abi/segfault-no-out-of-stack.rs index 113c82c30e927..b5af13ebfb5cf 100644 --- a/tests/ui/abi/segfault-no-out-of-stack.rs +++ b/tests/ui/abi/segfault-no-out-of-stack.rs @@ -1,6 +1,5 @@ //@ run-pass -//@ ignore-wasm32 can't run commands -//@ ignore-sgx no processes +//@ needs-subprocess //@ ignore-fuchsia must translate zircon signal to SIGSEGV/SIGBUS, FIXME (#58590) #![feature(rustc_private)] diff --git a/tests/ui/abi/stack-probes-lto.rs b/tests/ui/abi/stack-probes-lto.rs index e6c26c5c4de85..c6e5bea5f4225 100644 --- a/tests/ui/abi/stack-probes-lto.rs +++ b/tests/ui/abi/stack-probes-lto.rs @@ -3,7 +3,7 @@ //@[aarch64] only-aarch64 //@[x32] only-x86 //@[x64] only-x86_64 -//@ ignore-sgx no processes +//@ needs-subprocess //@ ignore-musl FIXME #31506 //@ ignore-fuchsia no exception handler registered for segfault //@ compile-flags: -C lto diff --git a/tests/ui/abi/stack-probes.rs b/tests/ui/abi/stack-probes.rs index 1c0e50250d768..f0fbd80d2e734 100644 --- a/tests/ui/abi/stack-probes.rs +++ b/tests/ui/abi/stack-probes.rs @@ -3,8 +3,7 @@ //@[aarch64] only-aarch64 //@[x32] only-x86 //@[x64] only-x86_64 -//@ ignore-emscripten no processes -//@ ignore-sgx no processes +//@ needs-subprocess //@ ignore-fuchsia no exception handler registered for segfault //@ ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino //@ ignore-ios Stack probes are enabled, but the SIGSEGV handler isn't diff --git a/tests/ui/alloc-error/default-alloc-error-hook.rs b/tests/ui/alloc-error/default-alloc-error-hook.rs index 5f977460b8c6e..7fbc66ca5f472 100644 --- a/tests/ui/alloc-error/default-alloc-error-hook.rs +++ b/tests/ui/alloc-error/default-alloc-error-hook.rs @@ -1,6 +1,5 @@ //@ run-pass -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess use std::alloc::{Layout, handle_alloc_error}; use std::env; diff --git a/tests/ui/array-slice-vec/bounds-check-no-overflow.rs b/tests/ui/array-slice-vec/bounds-check-no-overflow.rs index 4614df44084f2..c5ff805a853e0 100644 --- a/tests/ui/array-slice-vec/bounds-check-no-overflow.rs +++ b/tests/ui/array-slice-vec/bounds-check-no-overflow.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:index out of bounds -//@ ignore-emscripten no processes +//@ needs-subprocess use std::mem::size_of; diff --git a/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs b/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs index d64df4f7e4d9a..c7c05946c4ca9 100644 --- a/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs +++ b/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs @@ -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}; diff --git a/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs b/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs index 5ca3d60ad1dc9..98175a26ec0d1 100644 --- a/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs +++ b/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs @@ -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}; diff --git a/tests/ui/array-slice-vec/dst-raw-slice.rs b/tests/ui/array-slice-vec/dst-raw-slice.rs index f1281f4e302f2..ab9dedc139d7e 100644 --- a/tests/ui/array-slice-vec/dst-raw-slice.rs +++ b/tests/ui/array-slice-vec/dst-raw-slice.rs @@ -2,7 +2,7 @@ //@ run-fail //@ error-pattern:index out of bounds -//@ ignore-emscripten no processes +//@ needs-subprocess #[allow(unconditional_panic)] fn main() { diff --git a/tests/ui/array-slice-vec/nested-vec-3.rs b/tests/ui/array-slice-vec/nested-vec-3.rs index ce61401aab451..51975743742cf 100644 --- a/tests/ui/array-slice-vec/nested-vec-3.rs +++ b/tests/ui/array-slice-vec/nested-vec-3.rs @@ -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 diff --git a/tests/ui/array-slice-vec/slice-panic-1.rs b/tests/ui/array-slice-vec/slice-panic-1.rs index d4f584c163222..a745dff96afc7 100644 --- a/tests/ui/array-slice-vec/slice-panic-1.rs +++ b/tests/ui/array-slice-vec/slice-panic-1.rs @@ -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. diff --git a/tests/ui/array-slice-vec/slice-panic-2.rs b/tests/ui/array-slice-vec/slice-panic-2.rs index b3d1dc455735a..483a4cbe245db 100644 --- a/tests/ui/array-slice-vec/slice-panic-2.rs +++ b/tests/ui/array-slice-vec/slice-panic-2.rs @@ -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. diff --git a/tests/ui/array-slice-vec/vec-overrun.rs b/tests/ui/array-slice-vec/vec-overrun.rs index 10f8350869fb8..3b3e9215279f9 100644 --- a/tests/ui/array-slice-vec/vec-overrun.rs +++ b/tests/ui/array-slice-vec/vec-overrun.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:index out of bounds: the len is 1 but the index is 2 -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { let v: Vec = vec![10]; diff --git a/tests/ui/backtrace/backtrace.rs b/tests/ui/backtrace/backtrace.rs index 2579ff5203b4f..487473f4393b5 100644 --- a/tests/ui/backtrace/backtrace.rs +++ b/tests/ui/backtrace/backtrace.rs @@ -1,8 +1,7 @@ //@ run-pass //@ ignore-android FIXME #17520 -//@ ignore-wasm32 spawning processes is not supported +//@ needs-subprocess //@ ignore-openbsd no support for libbacktrace without filename -//@ ignore-sgx no processes //@ ignore-msvc see #62897 and `backtrace-debuginfo.rs` test //@ ignore-fuchsia Backtraces not symbolized //@ compile-flags:-g diff --git a/tests/ui/backtrace/std-backtrace.rs b/tests/ui/backtrace/std-backtrace.rs index 57d953a86408d..7ccbd46152bbf 100644 --- a/tests/ui/backtrace/std-backtrace.rs +++ b/tests/ui/backtrace/std-backtrace.rs @@ -1,8 +1,7 @@ //@ run-pass //@ ignore-android FIXME #17520 -//@ ignore-wasm32 spawning processes is not supported +//@ needs-subprocess //@ ignore-openbsd no support for libbacktrace without filename -//@ ignore-sgx no processes //@ ignore-fuchsia Backtraces not symbolized //@ compile-flags:-g //@ compile-flags:-Cstrip=none diff --git a/tests/ui/binop/binop-fail-3.rs b/tests/ui/binop/binop-fail-3.rs index b1e70a1c5961c..4e8d7e92ab6b0 100644 --- a/tests/ui/binop/binop-fail-3.rs +++ b/tests/ui/binop/binop-fail-3.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:quux -//@ ignore-emscripten no processes +//@ needs-subprocess fn foo() -> ! { panic!("quux"); diff --git a/tests/ui/binop/binop-panic.rs b/tests/ui/binop/binop-panic.rs index 8dbf62a922e45..8173eb0d6898f 100644 --- a/tests/ui/binop/binop-panic.rs +++ b/tests/ui/binop/binop-panic.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:quux -//@ ignore-emscripten no processes +//@ needs-subprocess fn my_err(s: String) -> ! { println!("{}", s); diff --git a/tests/ui/borrowck/borrowck-local-borrow.rs b/tests/ui/borrowck/borrowck-local-borrow.rs index de6ee5983c864..4d22503e37bae 100644 --- a/tests/ui/borrowck/borrowck-local-borrow.rs +++ b/tests/ui/borrowck/borrowck-local-borrow.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:panic 1 -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { let x = 2; diff --git a/tests/ui/borrowck/issue-28934.rs b/tests/ui/borrowck/issue-28934.rs index a3ac663c5b5c6..64559d4cf1ddc 100644 --- a/tests/ui/borrowck/issue-28934.rs +++ b/tests/ui/borrowck/issue-28934.rs @@ -3,7 +3,7 @@ //@ run-fail //@ error-pattern:explicit panic -//@ ignore-emscripten no processes +//@ needs-subprocess struct Parser<'i: 't, 't>(&'i u8, &'t u8); diff --git a/tests/ui/box/unit/unwind-unique.rs b/tests/ui/box/unit/unwind-unique.rs index 512327c9af456..1da55c45ee969 100644 --- a/tests/ui/box/unit/unwind-unique.rs +++ b/tests/ui/box/unit/unwind-unique.rs @@ -1,6 +1,6 @@ //@ run-pass //@ needs-unwind -//@ ignore-emscripten no threads support +//@ needs-threads use std::thread; diff --git a/tests/ui/cleanup-rvalue-temp-during-incomplete-alloc.rs b/tests/ui/cleanup-rvalue-temp-during-incomplete-alloc.rs index 80c5a8fe0995f..4c59df24e4b3f 100644 --- a/tests/ui/cleanup-rvalue-temp-during-incomplete-alloc.rs +++ b/tests/ui/cleanup-rvalue-temp-during-incomplete-alloc.rs @@ -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; diff --git a/tests/ui/closures/diverging-closure.rs b/tests/ui/closures/diverging-closure.rs index dda829d8af42e..2c86f55cf2595 100644 --- a/tests/ui/closures/diverging-closure.rs +++ b/tests/ui/closures/diverging-closure.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:oops -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { let func = || -> ! { diff --git a/tests/ui/command/command-argv0.rs b/tests/ui/command/command-argv0.rs index 35625c0b334cb..0907e18b30c7c 100644 --- a/tests/ui/command/command-argv0.rs +++ b/tests/ui/command/command-argv0.rs @@ -1,8 +1,7 @@ //@ run-pass -//@ ignore-windows - this is a unix-specific test -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ only-unix (this is a unix-specific test) +//@ needs-subprocess use std::env; use std::os::unix::process::CommandExt; use std::process::Command; diff --git a/tests/ui/command/command-current-dir.rs b/tests/ui/command/command-current-dir.rs index 23269e4123182..e264cbe4d7045 100644 --- a/tests/ui/command/command-current-dir.rs +++ b/tests/ui/command/command-current-dir.rs @@ -1,7 +1,6 @@ //@ run-pass //@ no-prefer-dynamic We move the binary around, so do not depend dynamically on libstd -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess //@ ignore-fuchsia Needs directory creation privilege use std::env; diff --git a/tests/ui/command/command-exec.rs b/tests/ui/command/command-exec.rs index d2545b0b472cf..77336377e8899 100644 --- a/tests/ui/command/command-exec.rs +++ b/tests/ui/command/command-exec.rs @@ -1,13 +1,9 @@ //@ run-pass -#![allow(stable_features)] -//@ ignore-windows - this is a unix-specific test -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ only-unix (this is a unix-specific test) +//@ needs-subprocess //@ ignore-fuchsia no execvp syscall provided -#![feature(process_exec)] - use std::env; use std::os::unix::process::CommandExt; use std::process::Command; diff --git a/tests/ui/command/command-pre-exec.rs b/tests/ui/command/command-pre-exec.rs index 7242dea27759a..7299f357bd078 100644 --- a/tests/ui/command/command-pre-exec.rs +++ b/tests/ui/command/command-pre-exec.rs @@ -1,11 +1,9 @@ //@ run-pass - -#![allow(stable_features)] -//@ ignore-windows - this is a unix-specific test -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ only-unix (this is a unix-specific test) +//@ needs-subprocess //@ ignore-fuchsia no execvp syscall -#![feature(process_exec, rustc_private)] + +#![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/command/command-setgroups.rs b/tests/ui/command/command-setgroups.rs index c940135d844ca..047f06729af98 100644 --- a/tests/ui/command/command-setgroups.rs +++ b/tests/ui/command/command-setgroups.rs @@ -1,9 +1,8 @@ //@ run-pass -//@ ignore-windows - this is a unix-specific test -//@ ignore-wasm32 -//@ ignore-sgx +//@ only-unix (this is a unix-specific test) //@ ignore-musl - returns dummy result for _SC_NGROUPS_MAX //@ ignore-nto - does not have `/bin/id`, expects groups to be i32 (not u32) +//@ needs-subprocess #![feature(rustc_private)] #![feature(setgroups)] diff --git a/tests/ui/command/command-uid-gid.rs b/tests/ui/command/command-uid-gid.rs index 7a70a0fbd7612..f54a0f50708ba 100644 --- a/tests/ui/command/command-uid-gid.rs +++ b/tests/ui/command/command-uid-gid.rs @@ -1,8 +1,7 @@ //@ run-pass //@ ignore-android -//@ ignore-emscripten -//@ ignore-sgx //@ ignore-fuchsia no '/bin/sh', '/bin/ls' +//@ needs-subprocess #![feature(rustc_private)] diff --git a/tests/ui/command/issue-10626.rs b/tests/ui/command/issue-10626.rs index f8dbb01151377..d2679ec9e29c8 100644 --- a/tests/ui/command/issue-10626.rs +++ b/tests/ui/command/issue-10626.rs @@ -1,6 +1,5 @@ //@ run-pass -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess // Make sure that if a process doesn't have its stdio/stderr descriptors set up // that we don't die in a large ball of fire diff --git a/tests/ui/consts/issue-29798.rs b/tests/ui/consts/issue-29798.rs index bdabbad6491f6..f7470d7aac908 100644 --- a/tests/ui/consts/issue-29798.rs +++ b/tests/ui/consts/issue-29798.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:index out of bounds: the len is 5 but the index is 5 -//@ ignore-emscripten no processes +//@ needs-subprocess const fn test(x: usize) -> i32 { [42;5][x] diff --git a/tests/ui/coroutine/coroutine-resume-after-panic.rs b/tests/ui/coroutine/coroutine-resume-after-panic.rs index 2745ebc61326f..1aa547c2a7bd2 100644 --- a/tests/ui/coroutine/coroutine-resume-after-panic.rs +++ b/tests/ui/coroutine/coroutine-resume-after-panic.rs @@ -1,7 +1,7 @@ //@ run-fail //@ needs-unwind //@ error-pattern:coroutine resumed after panicking -//@ ignore-emscripten no processes +//@ needs-subprocess // Test that we get the correct message for resuming a panicked coroutine. diff --git a/tests/ui/drop/drop-trait-enum.rs b/tests/ui/drop/drop-trait-enum.rs index 91b5bcdf7301d..5a88d959ec6fa 100644 --- a/tests/ui/drop/drop-trait-enum.rs +++ b/tests/ui/drop/drop-trait-enum.rs @@ -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; diff --git a/tests/ui/drop/terminate-in-initializer.rs b/tests/ui/drop/terminate-in-initializer.rs index 23169aaf65bdc..24ec39fe09638 100644 --- a/tests/ui/drop/terminate-in-initializer.rs +++ b/tests/ui/drop/terminate-in-initializer.rs @@ -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 diff --git a/tests/ui/expr/if/expr-if-panic-fn.rs b/tests/ui/expr/if/expr-if-panic-fn.rs index 4f3d7fd48e36e..0b4742d4a8999 100644 --- a/tests/ui/expr/if/expr-if-panic-fn.rs +++ b/tests/ui/expr/if/expr-if-panic-fn.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:explicit panic -//@ ignore-emscripten no processes +//@ needs-subprocess fn f() -> ! { panic!() diff --git a/tests/ui/expr/if/expr-if-panic.rs b/tests/ui/expr/if/expr-if-panic.rs index 0b43d1d6b0069..2f35878e844d1 100644 --- a/tests/ui/expr/if/expr-if-panic.rs +++ b/tests/ui/expr/if/expr-if-panic.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:explicit panic -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { let _x = if false { diff --git a/tests/ui/expr/if/if-check-panic.rs b/tests/ui/expr/if/if-check-panic.rs index 4b400deaca46f..eb0413f42fcf1 100644 --- a/tests/ui/expr/if/if-check-panic.rs +++ b/tests/ui/expr/if/if-check-panic.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:Number is odd -//@ ignore-emscripten no processes +//@ needs-subprocess fn even(x: usize) -> bool { if x < 2 { diff --git a/tests/ui/expr/if/if-cond-bot.rs b/tests/ui/expr/if/if-cond-bot.rs index ddb5559ffca7c..56bd5ec35f925 100644 --- a/tests/ui/expr/if/if-cond-bot.rs +++ b/tests/ui/expr/if/if-cond-bot.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:quux -//@ ignore-emscripten no processes +//@ needs-subprocess fn my_err(s: String) -> ! { println!("{}", s); diff --git a/tests/ui/extern/issue-18576.rs b/tests/ui/extern/issue-18576.rs index 0a98e85e4844f..6b41fe7363145 100644 --- a/tests/ui/extern/issue-18576.rs +++ b/tests/ui/extern/issue-18576.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:stop -//@ ignore-emscripten no processes +//@ needs-subprocess // #18576 // Make sure that calling an extern function pointer in an unreachable diff --git a/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs b/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs index e9471d207da48..1cd52b70315c1 100644 --- a/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs +++ b/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs @@ -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, diff --git a/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs b/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs index 9486b5f1178c4..a44eb3828d0a9 100644 --- a/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs +++ b/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs @@ -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, diff --git a/tests/ui/fn/expr-fn-panic.rs b/tests/ui/fn/expr-fn-panic.rs index 23946b7533d66..d726aac2a4c07 100644 --- a/tests/ui/fn/expr-fn-panic.rs +++ b/tests/ui/fn/expr-fn-panic.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:explicit panic -//@ ignore-emscripten no processes +//@ needs-subprocess fn f() -> ! { panic!() diff --git a/tests/ui/hashmap/hashmap-capacity-overflow.rs b/tests/ui/hashmap/hashmap-capacity-overflow.rs index 91aebc3bbba8b..502dbe9fa932e 100644 --- a/tests/ui/hashmap/hashmap-capacity-overflow.rs +++ b/tests/ui/hashmap/hashmap-capacity-overflow.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:capacity overflow -//@ ignore-emscripten no processes +//@ needs-subprocess use std::collections::hash_map::HashMap; use std::mem::size_of; diff --git a/tests/ui/imports/glob-use-std.rs b/tests/ui/imports/glob-use-std.rs index b625543da81f5..d2af816e24f2d 100644 --- a/tests/ui/imports/glob-use-std.rs +++ b/tests/ui/imports/glob-use-std.rs @@ -2,7 +2,7 @@ //@ run-fail //@ error-pattern:panic works -//@ ignore-emscripten no processes +//@ needs-subprocess use std::*; diff --git a/tests/ui/intrinsics/panic-uninitialized-zeroed.rs b/tests/ui/intrinsics/panic-uninitialized-zeroed.rs index 67b9832d60140..346a94c37dd86 100644 --- a/tests/ui/intrinsics/panic-uninitialized-zeroed.rs +++ b/tests/ui/intrinsics/panic-uninitialized-zeroed.rs @@ -1,11 +1,10 @@ +// ignore-tidy-linelength +//! This test checks panic emitted from `mem::{uninitialized,zeroed}`. //@ run-pass //@ revisions: default strict //@ [strict]compile-flags: -Zstrict-init-checks -// ignore-tidy-linelength -//@ ignore-wasm32 spawning processes is not supported -//@ ignore-sgx no processes -// -// This test checks panic emitted from `mem::{uninitialized,zeroed}`. +//@ needs-subprocess + #![allow(deprecated, invalid_value)] #![feature(never_type)] diff --git a/tests/ui/issues/issue-12920.rs b/tests/ui/issues/issue-12920.rs index 7f453e499d48c..f3b1b643c45af 100644 --- a/tests/ui/issues/issue-12920.rs +++ b/tests/ui/issues/issue-12920.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:explicit panic -//@ ignore-emscripten no processes +//@ needs-subprocess pub fn main() { panic!(); diff --git a/tests/ui/issues/issue-13202.rs b/tests/ui/issues/issue-13202.rs index 89205fc7fd1a2..99ffba3fba51a 100644 --- a/tests/ui/issues/issue-13202.rs +++ b/tests/ui/issues/issue-13202.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:bad input -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { Some("foo").unwrap_or(panic!("bad input")).to_string(); diff --git a/tests/ui/issues/issue-20971.rs b/tests/ui/issues/issue-20971.rs index 377a3d9ea304b..31dd910191935 100644 --- a/tests/ui/issues/issue-20971.rs +++ b/tests/ui/issues/issue-20971.rs @@ -2,7 +2,7 @@ //@ run-fail //@ error-pattern:Hello, world! -//@ ignore-emscripten no processes +//@ needs-subprocess pub trait Parser { type Input; diff --git a/tests/ui/issues/issue-2190-1.rs b/tests/ui/issues/issue-2190-1.rs index 8db4a84aac860..e4e4bf9dbbee5 100644 --- a/tests/ui/issues/issue-2190-1.rs +++ b/tests/ui/issues/issue-2190-1.rs @@ -1,20 +1,16 @@ -//@ run-pass -#![allow(unused_must_use)] -#![allow(non_upper_case_globals)] - -//@ ignore-emscripten no threads +//@ check-pass use std::thread::Builder; -static generations: usize = 1024+256+128+49; +static GENERATIONS: usize = 1024+256+128+49; fn spawn(mut f: Box) { - Builder::new().stack_size(32 * 1024).spawn(move|| f()); + Builder::new().stack_size(32 * 1024).spawn(move || f()); } fn child_no(x: usize) -> Box { - Box::new(move|| { - if x < generations { + Box::new(move || { + if x < GENERATIONS { spawn(child_no(x+1)); } }) diff --git a/tests/ui/issues/issue-23354-2.rs b/tests/ui/issues/issue-23354-2.rs index 90de1276cc6bc..a296477215ed1 100644 --- a/tests/ui/issues/issue-23354-2.rs +++ b/tests/ui/issues/issue-23354-2.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:panic evaluated -//@ ignore-emscripten no processes +//@ needs-subprocess #[allow(unused_variables)] fn main() { diff --git a/tests/ui/issues/issue-23354.rs b/tests/ui/issues/issue-23354.rs index 31783842dac00..eff5f3d27147a 100644 --- a/tests/ui/issues/issue-23354.rs +++ b/tests/ui/issues/issue-23354.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:panic evaluated -//@ ignore-emscripten no processes +//@ needs-subprocess #[allow(unused_variables)] fn main() { diff --git a/tests/ui/issues/issue-2470-bounds-check-overflow.rs b/tests/ui/issues/issue-2470-bounds-check-overflow.rs index 241bc8fda9c21..4f300454dcb6e 100644 --- a/tests/ui/issues/issue-2470-bounds-check-overflow.rs +++ b/tests/ui/issues/issue-2470-bounds-check-overflow.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:index out of bounds -//@ ignore-emscripten no processes +//@ needs-subprocess use std::mem; diff --git a/tests/ui/issues/issue-25089.rs b/tests/ui/issues/issue-25089.rs index ea9ab290904c3..929738c3e794d 100644 --- a/tests/ui/issues/issue-25089.rs +++ b/tests/ui/issues/issue-25089.rs @@ -1,6 +1,6 @@ //@ run-pass //@ needs-unwind -//@ ignore-emscripten no threads support +//@ needs-threads use std::thread; diff --git a/tests/ui/issues/issue-26655.rs b/tests/ui/issues/issue-26655.rs index 7f1858fdb7d0e..416472b0b269e 100644 --- a/tests/ui/issues/issue-26655.rs +++ b/tests/ui/issues/issue-26655.rs @@ -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 diff --git a/tests/ui/issues/issue-2761.rs b/tests/ui/issues/issue-2761.rs index b44a24e09f258..6df7a5118b820 100644 --- a/tests/ui/issues/issue-2761.rs +++ b/tests/ui/issues/issue-2761.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:custom message -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { assert!(false, "custom message"); diff --git a/tests/ui/issues/issue-29485.rs b/tests/ui/issues/issue-29485.rs index 56865d0e5db15..a44bcd49c6a9c 100644 --- a/tests/ui/issues/issue-29485.rs +++ b/tests/ui/issues/issue-29485.rs @@ -2,7 +2,7 @@ #![allow(unused_attributes)] //@ aux-build:issue-29485.rs //@ needs-unwind -//@ ignore-emscripten no threads +//@ needs-threads #[feature(recover)] diff --git a/tests/ui/issues/issue-30018-panic.rs b/tests/ui/issues/issue-30018-panic.rs index f5482d7c741df..591848b6f7b4e 100644 --- a/tests/ui/issues/issue-30018-panic.rs +++ b/tests/ui/issues/issue-30018-panic.rs @@ -5,7 +5,7 @@ // SIGTRAP injected by the drop-flag consistency checking. //@ needs-unwind -//@ ignore-emscripten no threads support +//@ needs-threads struct Foo; diff --git a/tests/ui/issues/issue-3029.rs b/tests/ui/issues/issue-3029.rs index a070578969cb2..22d0906ccf701 100644 --- a/tests/ui/issues/issue-3029.rs +++ b/tests/ui/issues/issue-3029.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:so long -//@ ignore-emscripten no processes +//@ needs-subprocess #![allow(unreachable_code)] diff --git a/tests/ui/issues/issue-30380.rs b/tests/ui/issues/issue-30380.rs index 534bb3423d0fb..49fce3d150cd7 100644 --- a/tests/ui/issues/issue-30380.rs +++ b/tests/ui/issues/issue-30380.rs @@ -3,7 +3,7 @@ //@ run-fail //@ error-pattern:panicking destructors ftw! -//@ ignore-emscripten no processes +//@ needs-subprocess struct Observer<'a>(&'a mut FilledOnDrop); diff --git a/tests/ui/issues/issue-33770.rs b/tests/ui/issues/issue-33770.rs index 0fa91ac91c4d3..814e8f371765e 100644 --- a/tests/ui/issues/issue-33770.rs +++ b/tests/ui/issues/issue-33770.rs @@ -1,6 +1,5 @@ //@ run-pass -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess use std::process::{Command, Stdio}; use std::env; diff --git a/tests/ui/issues/issue-38763.rs b/tests/ui/issues/issue-38763.rs index 05cd648dcfe97..87c758db1723c 100644 --- a/tests/ui/issues/issue-38763.rs +++ b/tests/ui/issues/issue-38763.rs @@ -1,5 +1,5 @@ //@ run-pass -//@ ignore-emscripten +//@ needs-threads #[repr(C)] pub struct Foo(i128); diff --git a/tests/ui/issues/issue-44216-add-system-time.rs b/tests/ui/issues/issue-44216-add-system-time.rs index 207f72fade813..3838d28e33d1b 100644 --- a/tests/ui/issues/issue-44216-add-system-time.rs +++ b/tests/ui/issues/issue-44216-add-system-time.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:overflow -//@ ignore-emscripten no processes +//@ needs-subprocess use std::time::{Duration, SystemTime}; diff --git a/tests/ui/issues/issue-44216-sub-instant.rs b/tests/ui/issues/issue-44216-sub-instant.rs index 2457d2aaa0446..19cd12e685fd1 100644 --- a/tests/ui/issues/issue-44216-sub-instant.rs +++ b/tests/ui/issues/issue-44216-sub-instant.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:overflow -//@ ignore-emscripten no processes +//@ needs-subprocess use std::time::{Instant, Duration}; diff --git a/tests/ui/issues/issue-44216-sub-system-time.rs b/tests/ui/issues/issue-44216-sub-system-time.rs index 7e33f22793374..bd4f66f3e161b 100644 --- a/tests/ui/issues/issue-44216-sub-system-time.rs +++ b/tests/ui/issues/issue-44216-sub-system-time.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:overflow -//@ ignore-emscripten no processes +//@ needs-subprocess use std::time::{Duration, SystemTime}; diff --git a/tests/ui/lifetimes/tail-expr-lock-poisoning.rs b/tests/ui/lifetimes/tail-expr-lock-poisoning.rs index 6af6655149bd9..d7c7b2e24143a 100644 --- a/tests/ui/lifetimes/tail-expr-lock-poisoning.rs +++ b/tests/ui/lifetimes/tail-expr-lock-poisoning.rs @@ -1,5 +1,6 @@ //@ revisions: edition2021 edition2024 -//@ ignore-wasm no panic or subprocess support +//@ ignore-wasm no panic support +//@ needs-subprocess //@ [edition2024] edition: 2024 //@ run-pass //@ needs-unwind diff --git a/tests/ui/loops/for-each-loop-panic.rs b/tests/ui/loops/for-each-loop-panic.rs index 04784cac8f2fc..79cfca93e0e20 100644 --- a/tests/ui/loops/for-each-loop-panic.rs +++ b/tests/ui/loops/for-each-loop-panic.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:moop -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { for _ in 0_usize..10_usize { diff --git a/tests/ui/macros/assert-as-macro.rs b/tests/ui/macros/assert-as-macro.rs index 391b056292f84..c18a3d89fb635 100644 --- a/tests/ui/macros/assert-as-macro.rs +++ b/tests/ui/macros/assert-as-macro.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:assertion failed: 1 == 2 -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { assert!(1 == 2); diff --git a/tests/ui/macros/assert-eq-macro-msg.rs b/tests/ui/macros/assert-eq-macro-msg.rs index 39eeefeeef90e..9ef7552cc7b2d 100644 --- a/tests/ui/macros/assert-eq-macro-msg.rs +++ b/tests/ui/macros/assert-eq-macro-msg.rs @@ -2,7 +2,7 @@ //@ error-pattern:assertion `left == right` failed: 1 + 1 definitely should be 3 //@ error-pattern: left: 2 //@ error-pattern: right: 3 -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { assert_eq!(1 + 1, 3, "1 + 1 definitely should be 3"); diff --git a/tests/ui/macros/assert-eq-macro-panic.rs b/tests/ui/macros/assert-eq-macro-panic.rs index 22c3a8a634f4b..3c46e2798d11d 100644 --- a/tests/ui/macros/assert-eq-macro-panic.rs +++ b/tests/ui/macros/assert-eq-macro-panic.rs @@ -2,7 +2,7 @@ //@ error-pattern:assertion `left == right` failed //@ error-pattern: left: 14 //@ error-pattern: right: 15 -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { assert_eq!(14, 15); diff --git a/tests/ui/macros/assert-macro-explicit.rs b/tests/ui/macros/assert-macro-explicit.rs index 167581d2525e1..b14a182a876ce 100644 --- a/tests/ui/macros/assert-macro-explicit.rs +++ b/tests/ui/macros/assert-macro-explicit.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:assertion failed: false -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { assert!(false); diff --git a/tests/ui/macros/assert-macro-fmt.rs b/tests/ui/macros/assert-macro-fmt.rs index 475544303796d..3fd0f472d1606 100644 --- a/tests/ui/macros/assert-macro-fmt.rs +++ b/tests/ui/macros/assert-macro-fmt.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern: panicked //@ error-pattern: test-assert-fmt 42 rust -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { assert!(false, "test-assert-fmt {} {}", 42, "rust"); diff --git a/tests/ui/macros/assert-macro-owned.rs b/tests/ui/macros/assert-macro-owned.rs index 46a59db1390c2..f9b6f5f518059 100644 --- a/tests/ui/macros/assert-macro-owned.rs +++ b/tests/ui/macros/assert-macro-owned.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern:panicked //@ error-pattern:test-assert-owned -//@ ignore-emscripten no processes +//@ needs-subprocess #![allow(non_fmt_panics)] diff --git a/tests/ui/macros/assert-macro-static.rs b/tests/ui/macros/assert-macro-static.rs index 7d9e345d516a3..8c91d7722fc40 100644 --- a/tests/ui/macros/assert-macro-static.rs +++ b/tests/ui/macros/assert-macro-static.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern:panicked //@ error-pattern:test-assert-static -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { assert!(false, "test-assert-static"); diff --git a/tests/ui/macros/assert-matches-macro-msg.rs b/tests/ui/macros/assert-matches-macro-msg.rs index efa4121da9232..956bc9cf0f49b 100644 --- a/tests/ui/macros/assert-matches-macro-msg.rs +++ b/tests/ui/macros/assert-matches-macro-msg.rs @@ -2,7 +2,7 @@ //@ error-pattern:assertion `left matches right` failed: 1 + 1 definitely should be 3 //@ error-pattern: left: 2 //@ error-pattern: right: 3 -//@ ignore-emscripten no processes +//@ needs-subprocess #![feature(assert_matches)] diff --git a/tests/ui/macros/assert-ne-macro-msg.rs b/tests/ui/macros/assert-ne-macro-msg.rs index 0a578e1baf93c..24bc4dbea4753 100644 --- a/tests/ui/macros/assert-ne-macro-msg.rs +++ b/tests/ui/macros/assert-ne-macro-msg.rs @@ -2,7 +2,7 @@ //@ error-pattern:assertion `left != right` failed: 1 + 1 definitely should not be 2 //@ error-pattern: left: 2 //@ error-pattern: right: 2 -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { assert_ne!(1 + 1, 2, "1 + 1 definitely should not be 2"); diff --git a/tests/ui/macros/assert-ne-macro-panic.rs b/tests/ui/macros/assert-ne-macro-panic.rs index 9cf5f05e9f18b..c349825baf389 100644 --- a/tests/ui/macros/assert-ne-macro-panic.rs +++ b/tests/ui/macros/assert-ne-macro-panic.rs @@ -2,7 +2,7 @@ //@ error-pattern:assertion `left != right` failed //@ error-pattern: left: 14 //@ error-pattern: right: 14 -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { assert_ne!(14, 14); diff --git a/tests/ui/macros/die-macro-2.rs b/tests/ui/macros/die-macro-2.rs index e5456bdfca0f9..d802f189ce1af 100644 --- a/tests/ui/macros/die-macro-2.rs +++ b/tests/ui/macros/die-macro-2.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:test -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { panic!("test"); diff --git a/tests/ui/macros/die-macro-expr.rs b/tests/ui/macros/die-macro-expr.rs index fb92dd66e3dc3..f4fefb0ca37dd 100644 --- a/tests/ui/macros/die-macro-expr.rs +++ b/tests/ui/macros/die-macro-expr.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:test -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { let __isize: isize = panic!("test"); diff --git a/tests/ui/macros/die-macro-pure.rs b/tests/ui/macros/die-macro-pure.rs index 484eed3d720f0..d84787705a1aa 100644 --- a/tests/ui/macros/die-macro-pure.rs +++ b/tests/ui/macros/die-macro-pure.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:test -//@ ignore-emscripten no processes +//@ needs-subprocess fn f() { panic!("test"); diff --git a/tests/ui/macros/unimplemented-macro-panic.rs b/tests/ui/macros/unimplemented-macro-panic.rs index d3bff8ca10ba0..804bd61270e2a 100644 --- a/tests/ui/macros/unimplemented-macro-panic.rs +++ b/tests/ui/macros/unimplemented-macro-panic.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:not implemented -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { unimplemented!() diff --git a/tests/ui/macros/unreachable-arg.rs b/tests/ui/macros/unreachable-arg.rs index 1f0d00734865b..702bd053ab022 100644 --- a/tests/ui/macros/unreachable-arg.rs +++ b/tests/ui/macros/unreachable-arg.rs @@ -1,4 +1,4 @@ -//@ ignore-emscripten no processes +//@ needs-subprocess //@ revisions: edition_2015 edition_2021 //@ [edition_2015]edition:2015 diff --git a/tests/ui/macros/unreachable-fmt-msg.rs b/tests/ui/macros/unreachable-fmt-msg.rs index b16394a1920eb..928e0a427ae42 100644 --- a/tests/ui/macros/unreachable-fmt-msg.rs +++ b/tests/ui/macros/unreachable-fmt-msg.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:internal error: entered unreachable code: 6 is not prime -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { unreachable!("{} is not {}", 6u32, "prime"); diff --git a/tests/ui/macros/unreachable-format-arg.rs b/tests/ui/macros/unreachable-format-arg.rs index 449c6bca16bce..e1fdab25a43c8 100644 --- a/tests/ui/macros/unreachable-format-arg.rs +++ b/tests/ui/macros/unreachable-format-arg.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ ignore-emscripten no processes +//@ needs-subprocess //@ revisions: edition_2015 edition_2021 //@ [edition_2015]edition:2015 diff --git a/tests/ui/macros/unreachable-format-args.rs b/tests/ui/macros/unreachable-format-args.rs index 5f8a0e9cdffa1..856fc992685ac 100644 --- a/tests/ui/macros/unreachable-format-args.rs +++ b/tests/ui/macros/unreachable-format-args.rs @@ -1,4 +1,4 @@ -//@ ignore-emscripten no processes +//@ needs-subprocess //@ revisions: edition_2015 edition_2021 //@ [edition_2015]edition:2015 diff --git a/tests/ui/macros/unreachable-macro-panic.rs b/tests/ui/macros/unreachable-macro-panic.rs index 7909bcb76242d..c5cea5551cfcf 100644 --- a/tests/ui/macros/unreachable-macro-panic.rs +++ b/tests/ui/macros/unreachable-macro-panic.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:internal error: entered unreachable code -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { unreachable!() diff --git a/tests/ui/macros/unreachable-static-msg.rs b/tests/ui/macros/unreachable-static-msg.rs index 3e917897da458..a85f8962e7d9c 100644 --- a/tests/ui/macros/unreachable-static-msg.rs +++ b/tests/ui/macros/unreachable-static-msg.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:internal error: entered unreachable code: uhoh -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { unreachable!("uhoh") diff --git a/tests/ui/macros/unreachable.rs b/tests/ui/macros/unreachable.rs index 7909bcb76242d..c5cea5551cfcf 100644 --- a/tests/ui/macros/unreachable.rs +++ b/tests/ui/macros/unreachable.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:internal error: entered unreachable code -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { unreachable!() diff --git a/tests/ui/match/expr-match-panic-fn.rs b/tests/ui/match/expr-match-panic-fn.rs index 82991d20df88d..a07c2c6af8f79 100644 --- a/tests/ui/match/expr-match-panic-fn.rs +++ b/tests/ui/match/expr-match-panic-fn.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:explicit panic -//@ ignore-emscripten no processes +//@ needs-subprocess fn f() -> ! { panic!() diff --git a/tests/ui/match/expr-match-panic.rs b/tests/ui/match/expr-match-panic.rs index e332ba83b914f..d15b0a9cd726f 100644 --- a/tests/ui/match/expr-match-panic.rs +++ b/tests/ui/match/expr-match-panic.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:explicit panic -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { let _x = match true { diff --git a/tests/ui/match/match-bot-panic.rs b/tests/ui/match/match-bot-panic.rs index a155b5fb3f27e..7ec07ae290d98 100644 --- a/tests/ui/match/match-bot-panic.rs +++ b/tests/ui/match/match-bot-panic.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:explicit panic -//@ ignore-emscripten no processes +//@ needs-subprocess #![allow(unreachable_code)] #![allow(unused_variables)] diff --git a/tests/ui/match/match-disc-bot.rs b/tests/ui/match/match-disc-bot.rs index fdb98a0accb8f..d65dc5aea0753 100644 --- a/tests/ui/match/match-disc-bot.rs +++ b/tests/ui/match/match-disc-bot.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:quux -//@ ignore-emscripten no processes +//@ needs-subprocess fn f() -> ! { panic!("quux") diff --git a/tests/ui/match/match-wildcards.rs b/tests/ui/match/match-wildcards.rs index 4fddee6666eac..1cc81a7c4159a 100644 --- a/tests/ui/match/match-wildcards.rs +++ b/tests/ui/match/match-wildcards.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:squirrelcupcake -//@ ignore-emscripten no processes +//@ needs-subprocess fn cmp() -> isize { match (Some('a'), None::) { diff --git a/tests/ui/meta/revision-ok.rs b/tests/ui/meta/revision-ok.rs index c1387f7d18e08..430d3d0a2397b 100644 --- a/tests/ui/meta/revision-ok.rs +++ b/tests/ui/meta/revision-ok.rs @@ -5,7 +5,7 @@ //@ revisions: foo bar //@[foo] error-pattern:foo //@[bar] error-pattern:bar -//@ ignore-emscripten no processes +//@ needs-subprocess #[cfg(foo)] fn die() { diff --git a/tests/ui/mir/mir_codegen_calls_converging_drops.rs b/tests/ui/mir/mir_codegen_calls_converging_drops.rs index 5c3c8b999b2de..8a6d3926de24a 100644 --- a/tests/ui/mir/mir_codegen_calls_converging_drops.rs +++ b/tests/ui/mir/mir_codegen_calls_converging_drops.rs @@ -2,7 +2,7 @@ //@ error-pattern:converging_fn called //@ error-pattern:0 dropped //@ error-pattern:exit -//@ ignore-emscripten no processes +//@ needs-subprocess struct Droppable(u8); impl Drop for Droppable { diff --git a/tests/ui/mir/mir_codegen_calls_converging_drops_2.rs b/tests/ui/mir/mir_codegen_calls_converging_drops_2.rs index e3cb9a96de0da..e89fbc58a0d1c 100644 --- a/tests/ui/mir/mir_codegen_calls_converging_drops_2.rs +++ b/tests/ui/mir/mir_codegen_calls_converging_drops_2.rs @@ -2,7 +2,7 @@ //@ error-pattern:complex called //@ error-pattern:dropped //@ error-pattern:exit -//@ ignore-emscripten no processes +//@ needs-subprocess struct Droppable; impl Drop for Droppable { diff --git a/tests/ui/mir/mir_codegen_calls_diverging.rs b/tests/ui/mir/mir_codegen_calls_diverging.rs index c62527f01d38c..ce2d7140b074e 100644 --- a/tests/ui/mir/mir_codegen_calls_diverging.rs +++ b/tests/ui/mir/mir_codegen_calls_diverging.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:diverging_fn called -//@ ignore-emscripten no processes +//@ needs-subprocess fn diverging_fn() -> ! { panic!("diverging_fn called") diff --git a/tests/ui/mir/mir_dynamic_drops_1.rs b/tests/ui/mir/mir_dynamic_drops_1.rs index ffb8cc26100e8..0b0a396057452 100644 --- a/tests/ui/mir/mir_dynamic_drops_1.rs +++ b/tests/ui/mir/mir_dynamic_drops_1.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern:drop 1 //@ error-pattern:drop 2 -//@ ignore-emscripten no processes +//@ needs-subprocess /// Structure which will not allow to be dropped twice. struct Droppable<'a>(&'a mut bool, u32); diff --git a/tests/ui/mir/mir_dynamic_drops_2.rs b/tests/ui/mir/mir_dynamic_drops_2.rs index dc71f414673de..f625f19be26cb 100644 --- a/tests/ui/mir/mir_dynamic_drops_2.rs +++ b/tests/ui/mir/mir_dynamic_drops_2.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:drop 1 -//@ ignore-emscripten no processes +//@ needs-subprocess /// Structure which will not allow to be dropped twice. struct Droppable<'a>(&'a mut bool, u32); diff --git a/tests/ui/mir/mir_dynamic_drops_3.rs b/tests/ui/mir/mir_dynamic_drops_3.rs index fe84502ef1dc1..2a8af4ce1fb4b 100644 --- a/tests/ui/mir/mir_dynamic_drops_3.rs +++ b/tests/ui/mir/mir_dynamic_drops_3.rs @@ -4,7 +4,7 @@ //@ error-pattern:drop 3 //@ error-pattern:drop 2 //@ error-pattern:drop 1 -//@ ignore-emscripten no processes +//@ needs-subprocess /// Structure which will not allow to be dropped twice. struct Droppable<'a>(&'a mut bool, u32); diff --git a/tests/ui/mir/mir_indexing_oob_1.rs b/tests/ui/mir/mir_indexing_oob_1.rs index 3afc2f0b32e62..936484b0c1edd 100644 --- a/tests/ui/mir/mir_indexing_oob_1.rs +++ b/tests/ui/mir/mir_indexing_oob_1.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:index out of bounds: the len is 5 but the index is 10 -//@ ignore-emscripten no processes +//@ needs-subprocess const C: [u32; 5] = [0; 5]; diff --git a/tests/ui/mir/mir_indexing_oob_2.rs b/tests/ui/mir/mir_indexing_oob_2.rs index 6e7c1c83536f4..310a7f8f2b75f 100644 --- a/tests/ui/mir/mir_indexing_oob_2.rs +++ b/tests/ui/mir/mir_indexing_oob_2.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:index out of bounds: the len is 5 but the index is 10 -//@ ignore-emscripten no processes +//@ needs-subprocess const C: &'static [u8; 5] = b"hello"; diff --git a/tests/ui/mir/mir_indexing_oob_3.rs b/tests/ui/mir/mir_indexing_oob_3.rs index 4012864c6ce63..44b3a2c5a6dd9 100644 --- a/tests/ui/mir/mir_indexing_oob_3.rs +++ b/tests/ui/mir/mir_indexing_oob_3.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:index out of bounds: the len is 5 but the index is 10 -//@ ignore-emscripten no processes +//@ needs-subprocess const C: &'static [u8; 5] = b"hello"; diff --git a/tests/ui/never_type/return-never-coerce.rs b/tests/ui/never_type/return-never-coerce.rs index 559b7d0e985e4..14f07dfeb76a9 100644 --- a/tests/ui/never_type/return-never-coerce.rs +++ b/tests/ui/never_type/return-never-coerce.rs @@ -2,7 +2,7 @@ //@ run-fail //@ error-pattern:aah! -//@ ignore-emscripten no processes +//@ needs-subprocess fn call_another_fn T>(f: F) -> T { f() diff --git a/tests/ui/nll/issue-51345-2.rs b/tests/ui/nll/issue-51345-2.rs index f2501fdbab405..39871d56a9af8 100644 --- a/tests/ui/nll/issue-51345-2.rs +++ b/tests/ui/nll/issue-51345-2.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern:thread 'main' panicked //@ error-pattern:explicit panic -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { let mut vec = vec![]; diff --git a/tests/ui/numbers-arithmetic/divide-by-zero.rs b/tests/ui/numbers-arithmetic/divide-by-zero.rs index 626daf9771ded..a05abadf4bb45 100644 --- a/tests/ui/numbers-arithmetic/divide-by-zero.rs +++ b/tests/ui/numbers-arithmetic/divide-by-zero.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:attempt to divide by zero -//@ ignore-emscripten no processes +//@ needs-subprocess #[allow(unconditional_panic)] fn main() { diff --git a/tests/ui/numbers-arithmetic/int-abs-overflow.rs b/tests/ui/numbers-arithmetic/int-abs-overflow.rs index e91141380482d..6397f62d06551 100644 --- a/tests/ui/numbers-arithmetic/int-abs-overflow.rs +++ b/tests/ui/numbers-arithmetic/int-abs-overflow.rs @@ -1,6 +1,6 @@ //@ run-pass //@ compile-flags: -C overflow-checks=on -//@ ignore-emscripten no threads support +//@ needs-threads //@ needs-unwind use std::thread; diff --git a/tests/ui/numbers-arithmetic/issue-8460.rs b/tests/ui/numbers-arithmetic/issue-8460.rs index 9d3044a7ca022..87867fdc93e41 100644 --- a/tests/ui/numbers-arithmetic/issue-8460.rs +++ b/tests/ui/numbers-arithmetic/issue-8460.rs @@ -1,6 +1,6 @@ //@ run-pass #![allow(unused_must_use)] -//@ ignore-emscripten no threads support +//@ needs-threads //@ needs-unwind #![feature(rustc_attrs)] diff --git a/tests/ui/numbers-arithmetic/mod-zero.rs b/tests/ui/numbers-arithmetic/mod-zero.rs index f3cc7c9fc88f0..300bd765c4037 100644 --- a/tests/ui/numbers-arithmetic/mod-zero.rs +++ b/tests/ui/numbers-arithmetic/mod-zero.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:attempt to calculate the remainder with a divisor of zero -//@ ignore-emscripten no processes +//@ needs-subprocess #[allow(unconditional_panic)] fn main() { diff --git a/tests/ui/numbers-arithmetic/overflowing-add.rs b/tests/ui/numbers-arithmetic/overflowing-add.rs index 16583f6eb749f..c1f498c802b41 100644 --- a/tests/ui/numbers-arithmetic/overflowing-add.rs +++ b/tests/ui/numbers-arithmetic/overflowing-add.rs @@ -2,7 +2,7 @@ //@ error-pattern:thread 'main' panicked //@ error-pattern:attempt to add with overflow //@ compile-flags: -C debug-assertions -//@ ignore-emscripten no processes +//@ needs-subprocess #![allow(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-mul.rs b/tests/ui/numbers-arithmetic/overflowing-mul.rs index 59575d2e86e07..0eece5369299b 100644 --- a/tests/ui/numbers-arithmetic/overflowing-mul.rs +++ b/tests/ui/numbers-arithmetic/overflowing-mul.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern:thread 'main' panicked //@ error-pattern:attempt to multiply with overflow -//@ ignore-emscripten no processes +//@ needs-subprocess //@ compile-flags: -C debug-assertions #![allow(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs b/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs index 8aa0d04e500c7..c5059c002b4bf 100644 --- a/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs +++ b/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:attempt to negate with overflow -//@ ignore-emscripten no processes +//@ needs-subprocess //@ compile-flags: -C debug-assertions #![allow(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs b/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs index 69e22c2262a3a..28deb7cf6bad1 100644 --- a/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs +++ b/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern:thread 'main' panicked //@ error-pattern:attempt to multiply with overflow -//@ ignore-emscripten no processes +//@ needs-subprocess //@ compile-flags: -C debug-assertions fn main() { diff --git a/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs b/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs index f980033c480e1..dea9a4d5428be 100644 --- a/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs +++ b/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern:thread 'main' panicked //@ error-pattern:attempt to multiply with overflow -//@ ignore-emscripten no processes +//@ needs-subprocess //@ compile-flags: -C debug-assertions fn main() { diff --git a/tests/ui/numbers-arithmetic/overflowing-sub.rs b/tests/ui/numbers-arithmetic/overflowing-sub.rs index 44aadf6b3e70e..88b1b693f6326 100644 --- a/tests/ui/numbers-arithmetic/overflowing-sub.rs +++ b/tests/ui/numbers-arithmetic/overflowing-sub.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern:thread 'main' panicked //@ error-pattern:attempt to subtract with overflow -//@ ignore-emscripten no processes +//@ needs-subprocess //@ compile-flags: -C debug-assertions #![allow(arithmetic_overflow)] diff --git a/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs b/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs index ce6644e675869..0566d2319df1a 100644 --- a/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs +++ b/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs @@ -1,10 +1,8 @@ //@ run-pass -#![allow(unused_variables)] //@ compile-flags:-C panic=abort //@ aux-build:exit-success-if-unwind.rs //@ no-prefer-dynamic -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess extern crate exit_success_if_unwind; @@ -13,7 +11,7 @@ use std::process::Command; fn main() { let mut args = env::args_os(); - let me = args.next().unwrap(); + let _ = args.next().unwrap(); if let Some(s) = args.next() { if &*s == "foo" { diff --git a/tests/ui/panic-runtime/abort.rs b/tests/ui/panic-runtime/abort.rs index caf0243ebdb26..8cdfd018a9282 100644 --- a/tests/ui/panic-runtime/abort.rs +++ b/tests/ui/panic-runtime/abort.rs @@ -1,9 +1,7 @@ //@ run-pass -#![allow(unused_variables)] //@ compile-flags:-C panic=abort //@ no-prefer-dynamic -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess use std::env; use std::process::Command; @@ -18,7 +16,7 @@ impl Drop for Bomb { fn main() { let mut args = env::args_os(); - let me = args.next().unwrap(); + let _ = args.next().unwrap(); if let Some(s) = args.next() { if &*s == "foo" { diff --git a/tests/ui/panic-runtime/lto-abort.rs b/tests/ui/panic-runtime/lto-abort.rs index c66b6a60c7389..cf15ae6435bfd 100644 --- a/tests/ui/panic-runtime/lto-abort.rs +++ b/tests/ui/panic-runtime/lto-abort.rs @@ -1,9 +1,7 @@ //@ run-pass -#![allow(unused_variables)] //@ compile-flags:-C lto -C panic=abort //@ no-prefer-dynamic -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess use std::process::Command; use std::env; @@ -18,7 +16,7 @@ impl Drop for Bomb { fn main() { let mut args = env::args_os(); - let me = args.next().unwrap(); + let _ = args.next().unwrap(); if let Some(s) = args.next() { if &*s == "foo" { diff --git a/tests/ui/panic-runtime/lto-unwind.rs b/tests/ui/panic-runtime/lto-unwind.rs index 5eab2bd56ed1f..93275052f8527 100644 --- a/tests/ui/panic-runtime/lto-unwind.rs +++ b/tests/ui/panic-runtime/lto-unwind.rs @@ -1,11 +1,8 @@ //@ run-pass -#![allow(unused_variables)] - //@ compile-flags:-C lto -C panic=unwind //@ needs-unwind //@ no-prefer-dynamic -//@ ignore-emscripten no processes -//@ ignore-sgx no processes +//@ needs-subprocess use std::process::Command; use std::env; @@ -20,7 +17,7 @@ impl Drop for Bomb { fn main() { let mut args = env::args_os(); - let me = args.next().unwrap(); + let _ = args.next().unwrap(); if let Some(s) = args.next() { if &*s == "foo" { diff --git a/tests/ui/panic-runtime/unwind-interleaved.rs b/tests/ui/panic-runtime/unwind-interleaved.rs index e5505cd893a11..83eb636509755 100644 --- a/tests/ui/panic-runtime/unwind-interleaved.rs +++ b/tests/ui/panic-runtime/unwind-interleaved.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:explicit panic -//@ ignore-emscripten no processes +//@ needs-subprocess fn a() {} diff --git a/tests/ui/panic-runtime/unwind-rec.rs b/tests/ui/panic-runtime/unwind-rec.rs index d4b53c8876813..a855a4de28014 100644 --- a/tests/ui/panic-runtime/unwind-rec.rs +++ b/tests/ui/panic-runtime/unwind-rec.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:explicit panic -//@ ignore-emscripten no processes +//@ needs-subprocess fn build() -> Vec { panic!(); diff --git a/tests/ui/panic-runtime/unwind-rec2.rs b/tests/ui/panic-runtime/unwind-rec2.rs index 6ac9a5a580547..ed02b117fff4b 100644 --- a/tests/ui/panic-runtime/unwind-rec2.rs +++ b/tests/ui/panic-runtime/unwind-rec2.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:explicit panic -//@ ignore-emscripten no processes +//@ needs-subprocess fn build1() -> Vec { vec![0, 0, 0, 0, 0, 0, 0] diff --git a/tests/ui/panic-runtime/unwind-unique.rs b/tests/ui/panic-runtime/unwind-unique.rs index a6cd59690ca92..b57d81842c4dd 100644 --- a/tests/ui/panic-runtime/unwind-unique.rs +++ b/tests/ui/panic-runtime/unwind-unique.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:explicit panic -//@ ignore-emscripten no processes +//@ needs-subprocess fn failfn() { panic!(); diff --git a/tests/ui/panics/abort-on-panic.rs b/tests/ui/panics/abort-on-panic.rs index feccefb253768..d3bf087bd3ef8 100644 --- a/tests/ui/panics/abort-on-panic.rs +++ b/tests/ui/panics/abort-on-panic.rs @@ -8,8 +8,7 @@ // Since we mark some ABIs as "nounwind" to LLVM, we must make sure that // we never unwind through them. -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess use std::io; use std::io::prelude::*; diff --git a/tests/ui/panics/args-panic.rs b/tests/ui/panics/args-panic.rs index 091ced9b47917..9675c99dcb6f8 100644 --- a/tests/ui/panics/args-panic.rs +++ b/tests/ui/panics/args-panic.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:meep -//@ ignore-emscripten no processes +//@ needs-subprocess fn f(_a: isize, _b: isize, _c: Box) { panic!("moop"); diff --git a/tests/ui/panics/doublepanic.rs b/tests/ui/panics/doublepanic.rs index 51945ea708c2e..6fddde82a277a 100644 --- a/tests/ui/panics/doublepanic.rs +++ b/tests/ui/panics/doublepanic.rs @@ -2,7 +2,7 @@ //@ run-fail //@ error-pattern:One -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { panic!("One"); diff --git a/tests/ui/panics/explicit-panic-msg.rs b/tests/ui/panics/explicit-panic-msg.rs index ef0c5b39f0990..e5728ef1e20c5 100644 --- a/tests/ui/panics/explicit-panic-msg.rs +++ b/tests/ui/panics/explicit-panic-msg.rs @@ -4,7 +4,7 @@ //@ run-fail //@ error-pattern:wooooo -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { let mut a = 1; diff --git a/tests/ui/panics/explicit-panic.rs b/tests/ui/panics/explicit-panic.rs index 34e952ef68f9b..7c69289940e49 100644 --- a/tests/ui/panics/explicit-panic.rs +++ b/tests/ui/panics/explicit-panic.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:explicit -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { panic!(); diff --git a/tests/ui/panics/fmt-panic.rs b/tests/ui/panics/fmt-panic.rs index 032f65cb2e4b3..c6cb039684dba 100644 --- a/tests/ui/panics/fmt-panic.rs +++ b/tests/ui/panics/fmt-panic.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:meh -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { let str_var: String = "meh".to_string(); diff --git a/tests/ui/panics/issue-47429-short-backtraces.rs b/tests/ui/panics/issue-47429-short-backtraces.rs index dff885af1b87a..4a73ebe8712dc 100644 --- a/tests/ui/panics/issue-47429-short-backtraces.rs +++ b/tests/ui/panics/issue-47429-short-backtraces.rs @@ -17,10 +17,10 @@ //@ ignore-msvc see #62897 and `backtrace-debuginfo.rs` test //@ ignore-android FIXME #17520 //@ ignore-openbsd no support for libbacktrace without filename -//@ ignore-wasm no panic or subprocess support -//@ ignore-emscripten no panic or subprocess support -//@ ignore-sgx no subprocess support +//@ ignore-wasm no panic support +//@ ignore-emscripten no panic support //@ ignore-fuchsia Backtraces not symbolized +//@ needs-subprocess fn main() { panic!() diff --git a/tests/ui/panics/main-panic.rs b/tests/ui/panics/main-panic.rs index b69f1656ca491..0b3d5c3aaec85 100644 --- a/tests/ui/panics/main-panic.rs +++ b/tests/ui/panics/main-panic.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:thread 'main' panicked at -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { panic!() diff --git a/tests/ui/panics/panic-arg.rs b/tests/ui/panics/panic-arg.rs index 10be6d5ff6ce1..037cfda3689a1 100644 --- a/tests/ui/panics/panic-arg.rs +++ b/tests/ui/panics/panic-arg.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:woe -//@ ignore-emscripten no processes +//@ needs-subprocess fn f(a: isize) { println!("{}", a); diff --git a/tests/ui/panics/panic-handler-chain-update-hook.rs b/tests/ui/panics/panic-handler-chain-update-hook.rs index 1f8fe30cfd8c2..662ea9e978f70 100644 --- a/tests/ui/panics/panic-handler-chain-update-hook.rs +++ b/tests/ui/panics/panic-handler-chain-update-hook.rs @@ -2,7 +2,7 @@ //@ needs-unwind #![allow(stable_features)] -//@ ignore-emscripten no threads support +//@ needs-threads #![feature(std_panic)] #![feature(panic_update_hook)] diff --git a/tests/ui/panics/panic-handler-flail-wildly.rs b/tests/ui/panics/panic-handler-flail-wildly.rs index 768c9d4c4c5ec..d42dfd68d9cf8 100644 --- a/tests/ui/panics/panic-handler-flail-wildly.rs +++ b/tests/ui/panics/panic-handler-flail-wildly.rs @@ -4,7 +4,7 @@ #![allow(stable_features)] #![allow(unused_must_use)] -//@ ignore-emscripten no threads support +//@ needs-threads #![feature(std_panic)] diff --git a/tests/ui/panics/panic-handler-set-twice.rs b/tests/ui/panics/panic-handler-set-twice.rs index 902e48b65414e..5f670d5f49298 100644 --- a/tests/ui/panics/panic-handler-set-twice.rs +++ b/tests/ui/panics/panic-handler-set-twice.rs @@ -5,7 +5,7 @@ #![feature(std_panic)] -//@ ignore-emscripten no threads support +//@ needs-threads use std::sync::atomic::{AtomicUsize, Ordering}; use std::panic; diff --git a/tests/ui/panics/panic-in-dtor-drops-fields.rs b/tests/ui/panics/panic-in-dtor-drops-fields.rs index 4d18dc0e05916..38eb6d0acfb81 100644 --- a/tests/ui/panics/panic-in-dtor-drops-fields.rs +++ b/tests/ui/panics/panic-in-dtor-drops-fields.rs @@ -3,7 +3,7 @@ #![allow(dead_code)] #![allow(non_upper_case_globals)] -//@ ignore-emscripten no threads support +//@ needs-threads use std::thread; diff --git a/tests/ui/panics/panic-macro-any-wrapped.rs b/tests/ui/panics/panic-macro-any-wrapped.rs index 7c6790e35fd16..e3a2dc6eed42e 100644 --- a/tests/ui/panics/panic-macro-any-wrapped.rs +++ b/tests/ui/panics/panic-macro-any-wrapped.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern:panicked //@ error-pattern:Box -//@ ignore-emscripten no processes +//@ needs-subprocess #![allow(non_fmt_panics)] diff --git a/tests/ui/panics/panic-macro-any.rs b/tests/ui/panics/panic-macro-any.rs index 75397333fa4a3..1392929b65c2e 100644 --- a/tests/ui/panics/panic-macro-any.rs +++ b/tests/ui/panics/panic-macro-any.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern:panicked //@ error-pattern:Box -//@ ignore-emscripten no processes +//@ needs-subprocess #![allow(non_fmt_panics)] diff --git a/tests/ui/panics/panic-macro-explicit.rs b/tests/ui/panics/panic-macro-explicit.rs index 2c7b84d99fea2..b9195e3b0fccf 100644 --- a/tests/ui/panics/panic-macro-explicit.rs +++ b/tests/ui/panics/panic-macro-explicit.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern:panicked //@ error-pattern:explicit panic -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { panic!(); diff --git a/tests/ui/panics/panic-macro-fmt.rs b/tests/ui/panics/panic-macro-fmt.rs index 1a63a06c75ad3..550cd5c1ee333 100644 --- a/tests/ui/panics/panic-macro-fmt.rs +++ b/tests/ui/panics/panic-macro-fmt.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern:panicked //@ error-pattern:test-fail-fmt 42 rust -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { panic!("test-fail-fmt {} {}", 42, "rust"); diff --git a/tests/ui/panics/panic-macro-owned.rs b/tests/ui/panics/panic-macro-owned.rs index 1878f3d52abde..4df04c50bc3eb 100644 --- a/tests/ui/panics/panic-macro-owned.rs +++ b/tests/ui/panics/panic-macro-owned.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern:panicked //@ error-pattern:test-fail-owned -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { panic!("test-fail-owned"); diff --git a/tests/ui/panics/panic-macro-static.rs b/tests/ui/panics/panic-macro-static.rs index 018166e60cfab..1c6258ebed24b 100644 --- a/tests/ui/panics/panic-macro-static.rs +++ b/tests/ui/panics/panic-macro-static.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern:panicked //@ error-pattern:test-fail-static -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { panic!("test-fail-static"); diff --git a/tests/ui/panics/panic-main.rs b/tests/ui/panics/panic-main.rs index d71fca0754e9e..3876dbb37c37d 100644 --- a/tests/ui/panics/panic-main.rs +++ b/tests/ui/panics/panic-main.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:moop -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { panic!("moop"); diff --git a/tests/ui/panics/panic-parens.rs b/tests/ui/panics/panic-parens.rs index 271d0363cab8a..5440bf18f2567 100644 --- a/tests/ui/panics/panic-parens.rs +++ b/tests/ui/panics/panic-parens.rs @@ -3,7 +3,7 @@ //@ run-fail //@ error-pattern:oops -//@ ignore-emscripten no processes +//@ needs-subprocess fn bigpanic() { while (panic!("oops")) { diff --git a/tests/ui/panics/panic-recover-propagate.rs b/tests/ui/panics/panic-recover-propagate.rs index f8be86be19db6..ef6ae4fd7887d 100644 --- a/tests/ui/panics/panic-recover-propagate.rs +++ b/tests/ui/panics/panic-recover-propagate.rs @@ -1,6 +1,6 @@ //@ run-pass //@ needs-unwind -//@ ignore-emscripten no threads support +//@ needs-threads use std::sync::atomic::{AtomicUsize, Ordering}; use std::panic; diff --git a/tests/ui/panics/panic-set-handler.rs b/tests/ui/panics/panic-set-handler.rs index 39286ca865ba5..41e513e0bd680 100644 --- a/tests/ui/panics/panic-set-handler.rs +++ b/tests/ui/panics/panic-set-handler.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:greetings from the panic handler -//@ ignore-emscripten no processes +//@ needs-subprocess use std::panic; diff --git a/tests/ui/panics/panic-set-unset-handler.rs b/tests/ui/panics/panic-set-unset-handler.rs index 02f1599338b66..66d5003d0f1c5 100644 --- a/tests/ui/panics/panic-set-unset-handler.rs +++ b/tests/ui/panics/panic-set-unset-handler.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern:thread 'main' panicked //@ error-pattern:foobar -//@ ignore-emscripten no processes +//@ needs-subprocess use std::panic; diff --git a/tests/ui/panics/panic-take-handler-nop.rs b/tests/ui/panics/panic-take-handler-nop.rs index 89e1d234df138..f10582872df21 100644 --- a/tests/ui/panics/panic-take-handler-nop.rs +++ b/tests/ui/panics/panic-take-handler-nop.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern:thread 'main' panicked //@ error-pattern:foobar -//@ ignore-emscripten no processes +//@ needs-subprocess use std::panic; diff --git a/tests/ui/panics/panic.rs b/tests/ui/panics/panic.rs index b9721ac8230f7..068f187524d5b 100644 --- a/tests/ui/panics/panic.rs +++ b/tests/ui/panics/panic.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:1 == 2 -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { assert!(1 == 2); diff --git a/tests/ui/panics/result-get-panic.rs b/tests/ui/panics/result-get-panic.rs index d7f6dfe8406da..b8dc49f9acaa5 100644 --- a/tests/ui/panics/result-get-panic.rs +++ b/tests/ui/panics/result-get-panic.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:called `Result::unwrap()` on an `Err` value -//@ ignore-emscripten no processes +//@ needs-subprocess use std::result::Result::Err; diff --git a/tests/ui/panics/runtime-switch.rs b/tests/ui/panics/runtime-switch.rs index ffd038f953515..9f0be8c7ddfa6 100644 --- a/tests/ui/panics/runtime-switch.rs +++ b/tests/ui/panics/runtime-switch.rs @@ -18,9 +18,9 @@ //@ ignore-android FIXME #17520 //@ ignore-openbsd no support for libbacktrace without filename //@ ignore-wasm no backtrace support -//@ ignore-emscripten no panic or subprocess support -//@ ignore-sgx no subprocess support +//@ ignore-emscripten no panic support //@ ignore-fuchsia Backtrace not symbolized +//@ needs-subprocess #![feature(panic_backtrace_config)] diff --git a/tests/ui/panics/test-panic.rs b/tests/ui/panics/test-panic.rs index 29a3c4e9c9f1a..c7af47524cfcf 100644 --- a/tests/ui/panics/test-panic.rs +++ b/tests/ui/panics/test-panic.rs @@ -1,7 +1,7 @@ //@ run-fail //@ check-stdout //@ compile-flags: --test -//@ ignore-emscripten +//@ needs-subprocess #[test] fn test_foo() { diff --git a/tests/ui/panics/test-should-panic-no-message.rs b/tests/ui/panics/test-should-panic-no-message.rs index b6ed6b19dd086..05fc927d876b5 100644 --- a/tests/ui/panics/test-should-panic-no-message.rs +++ b/tests/ui/panics/test-should-panic-no-message.rs @@ -1,7 +1,7 @@ //@ run-fail //@ compile-flags: --test //@ check-stdout -//@ ignore-wasm32 no processes +//@ needs-subprocess #[test] #[should_panic(expected = "foo")] diff --git a/tests/ui/panics/while-body-panics.rs b/tests/ui/panics/while-body-panics.rs index bddcd5d50ce4c..8459a8d63bff3 100644 --- a/tests/ui/panics/while-body-panics.rs +++ b/tests/ui/panics/while-body-panics.rs @@ -2,7 +2,7 @@ //@ run-fail //@ error-pattern:quux -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { let _x: isize = { diff --git a/tests/ui/panics/while-panic.rs b/tests/ui/panics/while-panic.rs index 2961e8599c356..4c8431c71d128 100644 --- a/tests/ui/panics/while-panic.rs +++ b/tests/ui/panics/while-panic.rs @@ -2,7 +2,7 @@ //@ run-fail //@ error-pattern:giraffe -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { panic!("{}", { diff --git a/tests/ui/print-stdout-eprint-stderr.rs b/tests/ui/print-stdout-eprint-stderr.rs index e84a9bebc495a..4b356e2fe6172 100644 --- a/tests/ui/print-stdout-eprint-stderr.rs +++ b/tests/ui/print-stdout-eprint-stderr.rs @@ -1,6 +1,5 @@ //@ run-pass -//@ ignore-wasm32 spawning processes is not supported -//@ ignore-sgx no processes +//@ needs-subprocess use std::{env, process}; diff --git a/tests/ui/process/core-run-destroy.rs b/tests/ui/process/core-run-destroy.rs index 3f2ea0e844116..b4815c9dfbb52 100644 --- a/tests/ui/process/core-run-destroy.rs +++ b/tests/ui/process/core-run-destroy.rs @@ -1,12 +1,11 @@ //@ run-pass #![allow(unused_must_use)] -#![allow(stable_features)] #![allow(deprecated)] #![allow(unused_imports)] + //@ compile-flags:--test -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess //@ ignore-vxworks no 'cat' and 'sleep' //@ ignore-fuchsia no 'cat' diff --git a/tests/ui/process/env-args-reverse-iterator.rs b/tests/ui/process/env-args-reverse-iterator.rs index 830e953546644..f0afeeb22eb73 100644 --- a/tests/ui/process/env-args-reverse-iterator.rs +++ b/tests/ui/process/env-args-reverse-iterator.rs @@ -1,6 +1,5 @@ //@ run-pass -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess use std::env::args; use std::process::Command; diff --git a/tests/ui/process/fds-are-cloexec.rs b/tests/ui/process/fds-are-cloexec.rs index e7b000b2c499f..f6678379dd675 100644 --- a/tests/ui/process/fds-are-cloexec.rs +++ b/tests/ui/process/fds-are-cloexec.rs @@ -1,9 +1,8 @@ //@ run-pass -//@ ignore-windows +//@ only-unix //@ ignore-android -//@ ignore-wasm32 no processes +//@ needs-subprocess //@ ignore-haiku -//@ ignore-sgx no processes #![feature(rustc_private)] diff --git a/tests/ui/process/inherit-env.rs b/tests/ui/process/inherit-env.rs index 0eb61fcdd53b3..09d5b76141ef3 100644 --- a/tests/ui/process/inherit-env.rs +++ b/tests/ui/process/inherit-env.rs @@ -1,6 +1,5 @@ //@ run-pass -//@ ignore-wasm32 no subprocess support -//@ ignore-sgx no processes +//@ needs-subprocess use std::env; use std::process::Command; diff --git a/tests/ui/process/issue-13304.rs b/tests/ui/process/issue-13304.rs index 6dbf0caaaecee..621c54300d378 100644 --- a/tests/ui/process/issue-13304.rs +++ b/tests/ui/process/issue-13304.rs @@ -1,7 +1,5 @@ //@ run-pass -#![allow(unused_mut)] -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess use std::env; use std::io::prelude::*; @@ -32,7 +30,7 @@ fn parent() { } fn child() { - let mut stdin = io::stdin(); + let stdin = io::stdin(); for line in stdin.lock().lines() { println!("{}", line.unwrap()); } diff --git a/tests/ui/process/issue-14456.rs b/tests/ui/process/issue-14456.rs index fd6da8a5fc471..e67a9d8bad559 100644 --- a/tests/ui/process/issue-14456.rs +++ b/tests/ui/process/issue-14456.rs @@ -1,7 +1,5 @@ //@ run-pass -#![allow(unused_mut)] -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess use std::env; use std::io::prelude::*; @@ -20,7 +18,7 @@ fn main() { fn child() { writeln!(&mut io::stdout(), "foo").unwrap(); writeln!(&mut io::stderr(), "bar").unwrap(); - let mut stdin = io::stdin(); + let stdin = io::stdin(); let mut s = String::new(); stdin.lock().read_line(&mut s).unwrap(); assert_eq!(s.len(), 0); diff --git a/tests/ui/process/issue-14940.rs b/tests/ui/process/issue-14940.rs index 13fb18154a0db..cfbc743250fde 100644 --- a/tests/ui/process/issue-14940.rs +++ b/tests/ui/process/issue-14940.rs @@ -1,6 +1,5 @@ //@ run-pass -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess use std::env; use std::process::Command; diff --git a/tests/ui/process/issue-16272.rs b/tests/ui/process/issue-16272.rs index bf26769d494f6..7270855475346 100644 --- a/tests/ui/process/issue-16272.rs +++ b/tests/ui/process/issue-16272.rs @@ -1,6 +1,5 @@ //@ run-pass -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess use std::process::Command; use std::env; diff --git a/tests/ui/process/issue-20091.rs b/tests/ui/process/issue-20091.rs index b6d94661b75c2..72bf4c0e71eee 100644 --- a/tests/ui/process/issue-20091.rs +++ b/tests/ui/process/issue-20091.rs @@ -1,9 +1,5 @@ //@ run-pass -#![allow(stable_features)] -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes - -#![feature(os)] +//@ needs-subprocess #[cfg(unix)] fn main() { diff --git a/tests/ui/process/issue-30490.rs b/tests/ui/process/issue-30490.rs index 0d918bc3dd549..75b36e7c20b24 100644 --- a/tests/ui/process/issue-30490.rs +++ b/tests/ui/process/issue-30490.rs @@ -1,6 +1,5 @@ //@ run-pass -//@ ignore-emscripten no processes -//@ ignore-sgx no processes +//@ needs-subprocess //@ ignore-fuchsia Child I/O swaps not privileged // Previously libstd would set stdio descriptors of a child process diff --git a/tests/ui/process/multi-panic.rs b/tests/ui/process/multi-panic.rs index ad47925a14987..481fe75c731de 100644 --- a/tests/ui/process/multi-panic.rs +++ b/tests/ui/process/multi-panic.rs @@ -1,6 +1,5 @@ //@ run-pass -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess //@ needs-unwind fn check_for_no_backtrace(test: std::process::Output) { diff --git a/tests/ui/process/no-stdio.rs b/tests/ui/process/no-stdio.rs index 8eebf6dbc7d4e..5cc7cacbb22f0 100644 --- a/tests/ui/process/no-stdio.rs +++ b/tests/ui/process/no-stdio.rs @@ -1,7 +1,6 @@ //@ run-pass //@ ignore-android -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess #![feature(rustc_private)] diff --git a/tests/ui/process/println-with-broken-pipe.rs b/tests/ui/process/println-with-broken-pipe.rs index d88c6dcc12b31..fbac9b6cd958f 100644 --- a/tests/ui/process/println-with-broken-pipe.rs +++ b/tests/ui/process/println-with-broken-pipe.rs @@ -1,7 +1,7 @@ //@ run-pass //@ check-run-results +//@ needs-subprocess //@ ignore-windows -//@ ignore-wasm32 //@ ignore-fuchsia //@ ignore-horizon //@ ignore-android diff --git a/tests/ui/process/process-envs.rs b/tests/ui/process/process-envs.rs index 15285960d16ae..98052f1d3a5d7 100644 --- a/tests/ui/process/process-envs.rs +++ b/tests/ui/process/process-envs.rs @@ -1,6 +1,5 @@ //@ run-pass -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess //@ ignore-vxworks no 'env' //@ ignore-fuchsia no 'env' diff --git a/tests/ui/process/process-exit.rs b/tests/ui/process/process-exit.rs index a75a7306cbcd0..a1ed243b62b69 100644 --- a/tests/ui/process/process-exit.rs +++ b/tests/ui/process/process-exit.rs @@ -1,10 +1,8 @@ //@ run-pass -#![allow(unused_imports)] -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess use std::env; -use std::process::{self, Command, Stdio}; +use std::process::{self, Command}; fn main() { let args: Vec = env::args().collect(); diff --git a/tests/ui/process/process-panic-after-fork.rs b/tests/ui/process/process-panic-after-fork.rs index afb1b721182e5..6e0267e0a54f5 100644 --- a/tests/ui/process/process-panic-after-fork.rs +++ b/tests/ui/process/process-panic-after-fork.rs @@ -1,8 +1,7 @@ //@ run-pass //@ no-prefer-dynamic -//@ ignore-windows -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ only-unix +//@ needs-subprocess //@ ignore-fuchsia no fork #![feature(rustc_private)] diff --git a/tests/ui/process/process-remove-from-env.rs b/tests/ui/process/process-remove-from-env.rs index 21fff4fd45d1d..c1a2b2daf5b63 100644 --- a/tests/ui/process/process-remove-from-env.rs +++ b/tests/ui/process/process-remove-from-env.rs @@ -1,6 +1,5 @@ //@ run-pass -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess //@ ignore-vxworks no 'env' //@ ignore-fuchsia no 'env' diff --git a/tests/ui/process/process-sigpipe.rs b/tests/ui/process/process-sigpipe.rs index 9db130c26bd68..453e53379fc49 100644 --- a/tests/ui/process/process-sigpipe.rs +++ b/tests/ui/process/process-sigpipe.rs @@ -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; diff --git a/tests/ui/process/process-spawn-nonexistent.rs b/tests/ui/process/process-spawn-nonexistent.rs index 1cd328662994d..3db670624fb37 100644 --- a/tests/ui/process/process-spawn-nonexistent.rs +++ b/tests/ui/process/process-spawn-nonexistent.rs @@ -1,6 +1,5 @@ //@ run-pass -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess //@ ignore-fuchsia ErrorKind not translated use std::io::ErrorKind; diff --git a/tests/ui/process/process-spawn-with-unicode-params.rs b/tests/ui/process/process-spawn-with-unicode-params.rs index 4d2ba49eeac71..65f835c13459c 100644 --- a/tests/ui/process/process-spawn-with-unicode-params.rs +++ b/tests/ui/process/process-spawn-with-unicode-params.rs @@ -7,8 +7,7 @@ // non-ASCII characters. The child process ensures all the strings are // intact. -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess //@ ignore-fuchsia Filesystem manipulation privileged use std::io::prelude::*; diff --git a/tests/ui/process/process-status-inherits-stdin.rs b/tests/ui/process/process-status-inherits-stdin.rs index 39eef34c5f862..d5dd0e55fa339 100644 --- a/tests/ui/process/process-status-inherits-stdin.rs +++ b/tests/ui/process/process-status-inherits-stdin.rs @@ -1,6 +1,5 @@ //@ run-pass -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess use std::env; use std::io; diff --git a/tests/ui/process/signal-exit-status.rs b/tests/ui/process/signal-exit-status.rs index a6acea476367a..33aa83abfc377 100644 --- a/tests/ui/process/signal-exit-status.rs +++ b/tests/ui/process/signal-exit-status.rs @@ -1,7 +1,6 @@ //@ run-pass -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes -//@ ignore-windows +//@ needs-subprocess +//@ only-unix (`code()` returns `None` if terminated by a signal on Unix) //@ ignore-fuchsia code returned as ZX_TASK_RETCODE_EXCEPTION_KILL, FIXME (#58590) #![feature(core_intrinsics)] diff --git a/tests/ui/process/sigpipe-should-be-ignored.rs b/tests/ui/process/sigpipe-should-be-ignored.rs index 44785bee7f80c..3dcf0117ae971 100644 --- a/tests/ui/process/sigpipe-should-be-ignored.rs +++ b/tests/ui/process/sigpipe-should-be-ignored.rs @@ -1,12 +1,9 @@ //@ run-pass +//@ needs-subprocess -#![allow(unused_must_use)] // Be sure that when a SIGPIPE would have been received that the entire process // doesn't die in a ball of fire, but rather it's gracefully handled. -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes - use std::env; use std::io::prelude::*; use std::io; @@ -14,7 +11,7 @@ use std::process::{Command, Stdio}; fn test() { let _ = io::stdin().read_line(&mut String::new()); - io::stdout().write(&[1]); + io::stdout().write(&[1]).unwrap(); assert!(io::stdout().flush().is_err()); } diff --git a/tests/ui/process/tls-exit-status.rs b/tests/ui/process/tls-exit-status.rs index cddcf369da0bd..6dd0d71ef356a 100644 --- a/tests/ui/process/tls-exit-status.rs +++ b/tests/ui/process/tls-exit-status.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern:nonzero //@ exec-env:RUST_NEWRT=1 -//@ ignore-wasm32 no processes +//@ needs-subprocess use std::env; diff --git a/tests/ui/process/try-wait.rs b/tests/ui/process/try-wait.rs index b6d026d802ff6..dcef43ad348ab 100644 --- a/tests/ui/process/try-wait.rs +++ b/tests/ui/process/try-wait.rs @@ -1,9 +1,5 @@ //@ run-pass - -#![allow(stable_features)] -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes -#![feature(process_try_wait)] +//@ needs-subprocess use std::env; use std::process::Command; diff --git a/tests/ui/reachable/issue-948.rs b/tests/ui/reachable/issue-948.rs index 8e239a1115eb4..6181e547acc81 100644 --- a/tests/ui/reachable/issue-948.rs +++ b/tests/ui/reachable/issue-948.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:beep boop -//@ ignore-emscripten no processes +//@ needs-subprocess #![allow(unused_variables)] diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.rs index fb6718e55b286..00a0ea04c0d1d 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern:returned Box from main() //@ failure-status: 1 -//@ ignore-emscripten no processes +//@ needs-subprocess use std::error::Error; use std::io; diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.rs index 91be3afbe225a..3b80c2b49a508 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:oh, dear -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() -> ! { panic!("oh, dear"); diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs index f1d972b3c5503..48605309965f7 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern:returned Box from main() //@ failure-status: 1 -//@ ignore-emscripten no processes +//@ needs-subprocess use std::io::{Error, ErrorKind}; diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.rs index acf3da2d55f36..8f7b3da31bb4c 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.rs @@ -1,7 +1,7 @@ //@ run-fail //@ error-pattern: An error message for you //@ failure-status: 1 -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() -> Result<(), &'static str> { Err("An error message for you") diff --git a/tests/ui/runtime/atomic-print.rs b/tests/ui/runtime/atomic-print.rs index 7352058973637..6b899d675a215 100644 --- a/tests/ui/runtime/atomic-print.rs +++ b/tests/ui/runtime/atomic-print.rs @@ -2,8 +2,8 @@ #![allow(unused_must_use)] #![allow(deprecated)] -//@ ignore-wasm32 no processes or threads -//@ ignore-sgx no processes +//@ needs-threads +//@ needs-subprocess use std::{env, fmt, process, sync, thread}; diff --git a/tests/ui/runtime/backtrace-debuginfo.rs b/tests/ui/runtime/backtrace-debuginfo.rs index da747ded44ff2..afc96d6bb5f54 100644 --- a/tests/ui/runtime/backtrace-debuginfo.rs +++ b/tests/ui/runtime/backtrace-debuginfo.rs @@ -9,8 +9,7 @@ //@ compile-flags:-g -Copt-level=0 -Cllvm-args=-enable-tail-merge=0 //@ compile-flags:-Cforce-frame-pointers=yes //@ compile-flags:-Cstrip=none -//@ ignore-wasm32 spawning processes is not supported -//@ ignore-sgx no processes +//@ needs-subprocess //@ ignore-fuchsia Backtrace not symbolized, trace different line alignment // FIXME(#117097): backtrace (possibly unwinding mechanism) seems to be different on at least diff --git a/tests/ui/runtime/out-of-stack.rs b/tests/ui/runtime/out-of-stack.rs index c5300635ad924..6be34afb56035 100644 --- a/tests/ui/runtime/out-of-stack.rs +++ b/tests/ui/runtime/out-of-stack.rs @@ -3,8 +3,7 @@ #![allow(unused_must_use)] #![allow(unconditional_recursion)] //@ ignore-android: FIXME (#20004) -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess //@ ignore-fuchsia must translate zircon signal to SIGABRT, FIXME (#58590) //@ ignore-nto no stack overflow handler used (no alternate stack available) //@ ignore-ios stack overflow handlers aren't enabled diff --git a/tests/ui/runtime/rt-explody-panic-payloads.rs b/tests/ui/runtime/rt-explody-panic-payloads.rs index bd3624a8aee3d..c177fd260ed4f 100644 --- a/tests/ui/runtime/rt-explody-panic-payloads.rs +++ b/tests/ui/runtime/rt-explody-panic-payloads.rs @@ -1,7 +1,6 @@ //@ run-pass //@ needs-unwind -//@ ignore-emscripten no processes -//@ ignore-sgx no processes +//@ needs-subprocess use std::env; use std::process::Command; diff --git a/tests/ui/runtime/running-with-no-runtime.rs b/tests/ui/runtime/running-with-no-runtime.rs index 5c219b6fedac5..7ac0dd912dc0d 100644 --- a/tests/ui/runtime/running-with-no-runtime.rs +++ b/tests/ui/runtime/running-with-no-runtime.rs @@ -1,6 +1,5 @@ //@ run-pass -//@ ignore-wasm32 spawning processes is not supported -//@ ignore-sgx no processes +//@ needs-subprocess #![no_main] diff --git a/tests/ui/sepcomp/sepcomp-unwind.rs b/tests/ui/sepcomp/sepcomp-unwind.rs index 6a40b5ccc1247..8c25278bb7ec6 100644 --- a/tests/ui/sepcomp/sepcomp-unwind.rs +++ b/tests/ui/sepcomp/sepcomp-unwind.rs @@ -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. diff --git a/tests/ui/simd/target-feature-mixup.rs b/tests/ui/simd/target-feature-mixup.rs index 62d87c3a6dc6c..2786251c7951b 100644 --- a/tests/ui/simd/target-feature-mixup.rs +++ b/tests/ui/simd/target-feature-mixup.rs @@ -3,8 +3,7 @@ #![allow(stable_features)] #![allow(overflowing_literals)] -//@ ignore-wasm32 no subprocess support -//@ ignore-sgx no processes +//@ needs-subprocess //@ ignore-fuchsia must translate zircon signal to SIGILL, FIXME (#58590) #![feature(repr_simd, target_feature, cfg_target_feature)] diff --git a/tests/ui/std/thread-sleep-ms.rs b/tests/ui/std/thread-sleep-ms.rs index 0a3d0253a20ef..2d668b8265c27 100644 --- a/tests/ui/std/thread-sleep-ms.rs +++ b/tests/ui/std/thread-sleep-ms.rs @@ -1,12 +1,9 @@ //@ run-pass -//@ ignore-sgx not supported -//@ ignore-emscripten -// FIXME: test hangs on emscripten -#![allow(deprecated)] -#![allow(unused_imports)] +//@ needs-threads +//@ ignore-emscripten (FIXME: test hangs on emscripten) -use std::thread; +#![allow(deprecated)] fn main() { - thread::sleep_ms(250); + std::thread::sleep_ms(250); } diff --git a/tests/ui/stdio-is-blocking.rs b/tests/ui/stdio-is-blocking.rs index dda100951dded..615530dcd47e4 100644 --- a/tests/ui/stdio-is-blocking.rs +++ b/tests/ui/stdio-is-blocking.rs @@ -1,6 +1,5 @@ //@ run-pass -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess use std::env; use std::io::prelude::*; diff --git a/tests/ui/str/str-overrun.rs b/tests/ui/str/str-overrun.rs index b8e245475da92..6d62b837694b0 100644 --- a/tests/ui/str/str-overrun.rs +++ b/tests/ui/str/str-overrun.rs @@ -1,6 +1,6 @@ //@ run-fail //@ error-pattern:index out of bounds: the len is 5 but the index is 5 -//@ ignore-emscripten no processes +//@ needs-subprocess fn main() { let s: String = "hello".to_string(); diff --git a/tests/ui/structs-enums/unit-like-struct-drop-run.rs b/tests/ui/structs-enums/unit-like-struct-drop-run.rs index 02d14265f3ef2..3d00871837cf8 100644 --- a/tests/ui/structs-enums/unit-like-struct-drop-run.rs +++ b/tests/ui/structs-enums/unit-like-struct-drop-run.rs @@ -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. diff --git a/tests/ui/structs/rhs-type.rs b/tests/ui/structs/rhs-type.rs index fde5c16a0680e..8ce924672cfd1 100644 --- a/tests/ui/structs/rhs-type.rs +++ b/tests/ui/structs/rhs-type.rs @@ -3,7 +3,7 @@ //@ run-fail //@ error-pattern:bye -//@ ignore-emscripten no processes +//@ needs-subprocess #![allow(unreachable_code)] #![allow(unused_variables)] diff --git a/tests/ui/suggestions/import-visible-path-39175.fixed b/tests/ui/suggestions/import-visible-path-39175.fixed new file mode 100644 index 0000000000000..1f2b5b8b0ce66 --- /dev/null +++ b/tests/ui/suggestions/import-visible-path-39175.fixed @@ -0,0 +1,16 @@ +// This test ignores some platforms as the particular extension trait used +// to demonstrate the issue is only available on unix. This is fine as +// the fix to suggested paths is not platform-dependent and will apply on +// these platforms also. + +//@ run-rustfix +//@ only-unix (the diagnostics is influenced by `use std::os::unix::process::CommandExt;`) + +use std::os::unix::process::CommandExt; +use std::process::Command; +// use std::os::unix::process::CommandExt; + +fn main() { + let _ = Command::new("echo").arg("hello").exec(); +//~^ ERROR no method named `exec` +} diff --git a/tests/ui/issues/issue-39175.rs b/tests/ui/suggestions/import-visible-path-39175.rs similarity index 69% rename from tests/ui/issues/issue-39175.rs rename to tests/ui/suggestions/import-visible-path-39175.rs index 7b801317b714b..a7e6134b2d9c0 100644 --- a/tests/ui/issues/issue-39175.rs +++ b/tests/ui/suggestions/import-visible-path-39175.rs @@ -3,14 +3,13 @@ // the fix to suggested paths is not platform-dependent and will apply on // these platforms also. -//@ ignore-windows -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ run-rustfix +//@ only-unix (the diagnostics is influenced by `use std::os::unix::process::CommandExt;`) use std::process::Command; // use std::os::unix::process::CommandExt; fn main() { - Command::new("echo").arg("hello").exec(); + let _ = Command::new("echo").arg("hello").exec(); //~^ ERROR no method named `exec` } diff --git a/tests/ui/issues/issue-39175.stderr b/tests/ui/suggestions/import-visible-path-39175.stderr similarity index 78% rename from tests/ui/issues/issue-39175.stderr rename to tests/ui/suggestions/import-visible-path-39175.stderr index bbe8badb65231..0b558ca4b52b1 100644 --- a/tests/ui/issues/issue-39175.stderr +++ b/tests/ui/suggestions/import-visible-path-39175.stderr @@ -1,8 +1,8 @@ error[E0599]: no method named `exec` found for mutable reference `&mut Command` in the current scope - --> $DIR/issue-39175.rs:14:39 + --> $DIR/import-visible-path-39175.rs:13:47 | -LL | Command::new("echo").arg("hello").exec(); - | ^^^^ +LL | let _ = Command::new("echo").arg("hello").exec(); + | ^^^^ | = help: items from traits can only be used if the trait is in scope help: there is a method `pre_exec` with a similar name, but with different arguments diff --git a/tests/ui/test-attrs/terse.rs b/tests/ui/test-attrs/terse.rs index 6c3f29ed10f99..6e605f994f2a3 100644 --- a/tests/ui/test-attrs/terse.rs +++ b/tests/ui/test-attrs/terse.rs @@ -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] diff --git a/tests/ui/test-attrs/test-panic-abort-disabled.rs b/tests/ui/test-attrs/test-panic-abort-disabled.rs index fbe3d7d5d18d7..05dd9395c2b06 100644 --- a/tests/ui/test-attrs/test-panic-abort-disabled.rs +++ b/tests/ui/test-attrs/test-panic-abort-disabled.rs @@ -4,8 +4,9 @@ //@ run-flags: --test-threads=1 //@ needs-unwind -//@ ignore-wasm no panic or subprocess support -//@ ignore-emscripten no panic or subprocess support +//@ ignore-wasm no panic support +//@ ignore-emscripten no panic support +//@ needs-subprocess #![cfg(test)] diff --git a/tests/ui/test-attrs/test-panic-abort-nocapture.rs b/tests/ui/test-attrs/test-panic-abort-nocapture.rs index 4377ae1ac3bd7..f7e15dbdbc30c 100644 --- a/tests/ui/test-attrs/test-panic-abort-nocapture.rs +++ b/tests/ui/test-attrs/test-panic-abort-nocapture.rs @@ -7,9 +7,9 @@ //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ ignore-android #120567 -//@ ignore-wasm no panic or subprocess support -//@ ignore-emscripten no panic or subprocess support -//@ ignore-sgx no subprocess support +//@ ignore-wasm no panic support +//@ ignore-emscripten no panic support +//@ needs-subprocess #![cfg(test)] diff --git a/tests/ui/test-attrs/test-panic-abort.rs b/tests/ui/test-attrs/test-panic-abort.rs index 3d203e059a46a..951cf54346b4f 100644 --- a/tests/ui/test-attrs/test-panic-abort.rs +++ b/tests/ui/test-attrs/test-panic-abort.rs @@ -7,9 +7,9 @@ //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ ignore-android #120567 -//@ ignore-wasm no panic or subprocess support -//@ ignore-emscripten no panic or subprocess support -//@ ignore-sgx no subprocess support +//@ ignore-wasm no panic support +//@ ignore-emscripten no panic support +//@ needs-subprocess #![cfg(test)] #![feature(test)] diff --git a/tests/ui/test-attrs/test-thread-capture.rs b/tests/ui/test-attrs/test-thread-capture.rs index c56f87f2ddac4..0a5b1e9816f2b 100644 --- a/tests/ui/test-attrs/test-thread-capture.rs +++ b/tests/ui/test-attrs/test-thread-capture.rs @@ -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] diff --git a/tests/ui/test-attrs/test-thread-nocapture.rs b/tests/ui/test-attrs/test-thread-nocapture.rs index 5b82e9b272076..ce5db7bf1c374 100644 --- a/tests/ui/test-attrs/test-thread-nocapture.rs +++ b/tests/ui/test-attrs/test-thread-nocapture.rs @@ -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] diff --git a/tests/ui/threads-sendsync/eprint-on-tls-drop.rs b/tests/ui/threads-sendsync/eprint-on-tls-drop.rs index 82abf21df3f41..e85c7c83339b4 100644 --- a/tests/ui/threads-sendsync/eprint-on-tls-drop.rs +++ b/tests/ui/threads-sendsync/eprint-on-tls-drop.rs @@ -1,6 +1,6 @@ //@ run-pass //@ needs-threads -//@ ignore-sgx no processes +//@ needs-subprocess use std::cell::RefCell; use std::env; diff --git a/tests/ui/threads-sendsync/issue-24313.rs b/tests/ui/threads-sendsync/issue-24313.rs index 99c6c4a5e12de..83ab5122e82b9 100644 --- a/tests/ui/threads-sendsync/issue-24313.rs +++ b/tests/ui/threads-sendsync/issue-24313.rs @@ -1,6 +1,6 @@ //@ run-pass //@ needs-threads -//@ ignore-sgx no processes +//@ needs-subprocess use std::process::Command; use std::{env, thread}; diff --git a/tests/ui/wait-forked-but-failed-child.rs b/tests/ui/wait-forked-but-failed-child.rs index dd6a7fa0e6505..04f1c1a65d5cb 100644 --- a/tests/ui/wait-forked-but-failed-child.rs +++ b/tests/ui/wait-forked-but-failed-child.rs @@ -1,6 +1,5 @@ //@ run-pass -//@ ignore-wasm32 no processes -//@ ignore-sgx no processes +//@ needs-subprocess //@ ignore-vxworks no 'ps' //@ ignore-fuchsia no 'ps' //@ ignore-nto no 'ps'