Skip to content

Commit

Permalink
tests: use needs-subprocess instead of `ignore-{wasm32,emscripten,s…
Browse files Browse the repository at this point in the history
…gx}`
  • Loading branch information
jieyouxu committed Jan 23, 2025
1 parent d27512d commit 63310ea
Show file tree
Hide file tree
Showing 156 changed files with 170 additions and 200 deletions.
3 changes: 1 addition & 2 deletions tests/ui/abi/homogenous-floats-target-feature-mixup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
// without #[repr(simd)]

//@ run-pass
//@ ignore-wasm32 no processes
//@ ignore-sgx no processes
//@ needs-subprocess

#![feature(avx512_target_feature)]

Expand Down
3 changes: 1 addition & 2 deletions tests/ui/abi/segfault-no-out-of-stack.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/abi/stack-probes-lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions tests/ui/abi/stack-probes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions tests/ui/alloc-error/default-alloc-error-hook.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/array-slice-vec/bounds-check-no-overflow.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:index out of bounds
//@ ignore-emscripten no processes
//@ needs-subprocess

use std::mem::size_of;

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/array-slice-vec/dst-raw-slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

//@ run-fail
//@ error-pattern:index out of bounds
//@ ignore-emscripten no processes
//@ needs-subprocess

#[allow(unconditional_panic)]
fn main() {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/array-slice-vec/vec-overrun.rs
Original file line number Diff line number Diff line change
@@ -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<isize> = vec![10];
Expand Down
3 changes: 1 addition & 2 deletions tests/ui/backtrace/backtrace.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions tests/ui/backtrace/std-backtrace.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/binop/binop-fail-3.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:quux
//@ ignore-emscripten no processes
//@ needs-subprocess

fn foo() -> ! {
panic!("quux");
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/binop/binop-panic.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:quux
//@ ignore-emscripten no processes
//@ needs-subprocess

fn my_err(s: String) -> ! {
println!("{}", s);
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/borrowck/borrowck-local-borrow.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:panic 1
//@ ignore-emscripten no processes
//@ needs-subprocess

fn main() {
let x = 2;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/borrowck/issue-28934.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/closures/diverging-closure.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:oops
//@ ignore-emscripten no processes
//@ needs-subprocess

fn main() {
let func = || -> ! {
Expand Down
3 changes: 1 addition & 2 deletions tests/ui/command/command-current-dir.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 1 addition & 2 deletions tests/ui/command/command-uid-gid.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//@ run-pass
//@ ignore-android
//@ ignore-emscripten
//@ ignore-sgx
//@ ignore-fuchsia no '/bin/sh', '/bin/ls'
//@ needs-subprocess

#![feature(rustc_private)]

Expand Down
3 changes: 1 addition & 2 deletions tests/ui/command/issue-10626.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/consts/issue-29798.rs
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/coroutine/coroutine-resume-after-panic.rs
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/expr/if/expr-if-panic-fn.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:explicit panic
//@ ignore-emscripten no processes
//@ needs-subprocess

fn f() -> ! {
panic!()
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/expr/if/expr-if-panic.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:explicit panic
//@ ignore-emscripten no processes
//@ needs-subprocess

fn main() {
let _x = if false {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/expr/if/if-check-panic.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/expr/if/if-cond-bot.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:quux
//@ ignore-emscripten no processes
//@ needs-subprocess

fn my_err(s: String) -> ! {
println!("{}", s);
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/extern/issue-18576.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/fn/expr-fn-panic.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:explicit panic
//@ ignore-emscripten no processes
//@ needs-subprocess

fn f() -> ! {
panic!()
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/hashmap/hashmap-capacity-overflow.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/imports/glob-use-std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

//@ run-fail
//@ error-pattern:panic works
//@ ignore-emscripten no processes
//@ needs-subprocess

use std::*;

Expand Down
9 changes: 4 additions & 5 deletions tests/ui/intrinsics/panic-uninitialized-zeroed.rs
Original file line number Diff line number Diff line change
@@ -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)]

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-12920.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:explicit panic
//@ ignore-emscripten no processes
//@ needs-subprocess

pub fn main() {
panic!();
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-13202.rs
Original file line number Diff line number Diff line change
@@ -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();
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-20971.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

//@ run-fail
//@ error-pattern:Hello, world!
//@ ignore-emscripten no processes
//@ needs-subprocess

pub trait Parser {
type Input;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-23354-2.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:panic evaluated
//@ ignore-emscripten no processes
//@ needs-subprocess

#[allow(unused_variables)]
fn main() {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-23354.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:panic evaluated
//@ ignore-emscripten no processes
//@ needs-subprocess

#[allow(unused_variables)]
fn main() {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-2470-bounds-check-overflow.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:index out of bounds
//@ ignore-emscripten no processes
//@ needs-subprocess

use std::mem;

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-2761.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:custom message
//@ ignore-emscripten no processes
//@ needs-subprocess

fn main() {
assert!(false, "custom message");
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-3029.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:so long
//@ ignore-emscripten no processes
//@ needs-subprocess

#![allow(unreachable_code)]

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-30380.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

//@ run-fail
//@ error-pattern:panicking destructors ftw!
//@ ignore-emscripten no processes
//@ needs-subprocess

struct Observer<'a>(&'a mut FilledOnDrop);

Expand Down
3 changes: 1 addition & 2 deletions tests/ui/issues/issue-33770.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//@ run-pass
//@ ignore-wasm32 no processes
//@ ignore-sgx no processes
//@ needs-subprocess

use std::process::{Command, Stdio};
use std::env;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-44216-add-system-time.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:overflow
//@ ignore-emscripten no processes
//@ needs-subprocess

use std::time::{Duration, SystemTime};

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-44216-sub-instant.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:overflow
//@ ignore-emscripten no processes
//@ needs-subprocess

use std::time::{Instant, Duration};

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-44216-sub-system-time.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:overflow
//@ ignore-emscripten no processes
//@ needs-subprocess

use std::time::{Duration, SystemTime};

Expand Down
3 changes: 2 additions & 1 deletion tests/ui/lifetimes/tail-expr-lock-poisoning.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/loops/for-each-loop-panic.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:moop
//@ ignore-emscripten no processes
//@ needs-subprocess

fn main() {
for _ in 0_usize..10_usize {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/macros/assert-as-macro.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:assertion failed: 1 == 2
//@ ignore-emscripten no processes
//@ needs-subprocess

fn main() {
assert!(1 == 2);
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/macros/assert-eq-macro-msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Loading

0 comments on commit 63310ea

Please sign in to comment.