1
Fork 0

tests: use needs-subprocess instead of ignore-{wasm32,emscripten,sgx}

This commit is contained in:
许杰友 Jieyou Xu (Joe) 2025-01-23 16:36:54 +08:00
parent a11227b916
commit 8a0310a0b1
156 changed files with 170 additions and 200 deletions

View file

@ -5,8 +5,7 @@
// without #[repr(simd)]
//@ run-pass
//@ ignore-wasm32 no processes
//@ ignore-sgx no processes
//@ needs-subprocess
#![feature(avx512_target_feature)]

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:index out of bounds
//@ ignore-emscripten no processes
//@ needs-subprocess
use std::mem::size_of;

View file

@ -2,7 +2,7 @@
//@ run-fail
//@ error-pattern:index out of bounds
//@ ignore-emscripten no processes
//@ needs-subprocess
#[allow(unconditional_panic)]
fn main() {

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:quux
//@ ignore-emscripten no processes
//@ needs-subprocess
fn foo() -> ! {
panic!("quux");

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:quux
//@ ignore-emscripten no processes
//@ needs-subprocess
fn my_err(s: String) -> ! {
println!("{}", s);

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:panic 1
//@ ignore-emscripten no processes
//@ needs-subprocess
fn main() {
let x = 2;

View file

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

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:oops
//@ ignore-emscripten no processes
//@ needs-subprocess
fn main() {
let func = || -> ! {

View file

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

View file

@ -1,8 +1,7 @@
//@ run-pass
//@ ignore-android
//@ ignore-emscripten
//@ ignore-sgx
//@ ignore-fuchsia no '/bin/sh', '/bin/ls'
//@ needs-subprocess
#![feature(rustc_private)]

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:explicit panic
//@ ignore-emscripten no processes
//@ needs-subprocess
fn f() -> ! {
panic!()

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:explicit panic
//@ ignore-emscripten no processes
//@ needs-subprocess
fn main() {
let _x = if false {

View file

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

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:quux
//@ ignore-emscripten no processes
//@ needs-subprocess
fn my_err(s: String) -> ! {
println!("{}", s);

View file

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

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:explicit panic
//@ ignore-emscripten no processes
//@ needs-subprocess
fn f() -> ! {
panic!()

View file

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

View file

@ -2,7 +2,7 @@
//@ run-fail
//@ error-pattern:panic works
//@ ignore-emscripten no processes
//@ needs-subprocess
use std::*;

View file

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

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:explicit panic
//@ ignore-emscripten no processes
//@ needs-subprocess
pub fn main() {
panic!();

View file

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

View file

@ -2,7 +2,7 @@
//@ run-fail
//@ error-pattern:Hello, world!
//@ ignore-emscripten no processes
//@ needs-subprocess
pub trait Parser {
type Input;

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:panic evaluated
//@ ignore-emscripten no processes
//@ needs-subprocess
#[allow(unused_variables)]
fn main() {

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:panic evaluated
//@ ignore-emscripten no processes
//@ needs-subprocess
#[allow(unused_variables)]
fn main() {

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:index out of bounds
//@ ignore-emscripten no processes
//@ needs-subprocess
use std::mem;

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:custom message
//@ ignore-emscripten no processes
//@ needs-subprocess
fn main() {
assert!(false, "custom message");

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:so long
//@ ignore-emscripten no processes
//@ needs-subprocess
#![allow(unreachable_code)]

View file

@ -3,7 +3,7 @@
//@ run-fail
//@ error-pattern:panicking destructors ftw!
//@ ignore-emscripten no processes
//@ needs-subprocess
struct Observer<'a>(&'a mut FilledOnDrop);

View file

@ -1,6 +1,5 @@
//@ run-pass
//@ ignore-wasm32 no processes
//@ ignore-sgx no processes
//@ needs-subprocess
use std::process::{Command, Stdio};
use std::env;

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:overflow
//@ ignore-emscripten no processes
//@ needs-subprocess
use std::time::{Duration, SystemTime};

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:overflow
//@ ignore-emscripten no processes
//@ needs-subprocess
use std::time::{Instant, Duration};

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:overflow
//@ ignore-emscripten no processes
//@ needs-subprocess
use std::time::{Duration, SystemTime};

View file

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

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:moop
//@ ignore-emscripten no processes
//@ needs-subprocess
fn main() {
for _ in 0_usize..10_usize {

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:assertion failed: 1 == 2
//@ ignore-emscripten no processes
//@ needs-subprocess
fn main() {
assert!(1 == 2);

View file

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

View file

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

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:assertion failed: false
//@ ignore-emscripten no processes
//@ needs-subprocess
fn main() {
assert!(false);

View file

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

View file

@ -1,7 +1,7 @@
//@ run-fail
//@ error-pattern:panicked
//@ error-pattern:test-assert-owned
//@ ignore-emscripten no processes
//@ needs-subprocess
#![allow(non_fmt_panics)]

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:test
//@ ignore-emscripten no processes
//@ needs-subprocess
fn main() {
panic!("test");

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:test
//@ ignore-emscripten no processes
//@ needs-subprocess
fn main() {
let __isize: isize = panic!("test");

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:test
//@ ignore-emscripten no processes
//@ needs-subprocess
fn f() {
panic!("test");

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:not implemented
//@ ignore-emscripten no processes
//@ needs-subprocess
fn main() {
unimplemented!()

View file

@ -1,4 +1,4 @@
//@ ignore-emscripten no processes
//@ needs-subprocess
//@ revisions: edition_2015 edition_2021
//@ [edition_2015]edition:2015

View file

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

View file

@ -1,5 +1,5 @@
//@ run-fail
//@ ignore-emscripten no processes
//@ needs-subprocess
//@ revisions: edition_2015 edition_2021
//@ [edition_2015]edition:2015

View file

@ -1,4 +1,4 @@
//@ ignore-emscripten no processes
//@ needs-subprocess
//@ revisions: edition_2015 edition_2021
//@ [edition_2015]edition:2015

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:internal error: entered unreachable code
//@ ignore-emscripten no processes
//@ needs-subprocess
fn main() {
unreachable!()

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:internal error: entered unreachable code: uhoh
//@ ignore-emscripten no processes
//@ needs-subprocess
fn main() {
unreachable!("uhoh")

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:internal error: entered unreachable code
//@ ignore-emscripten no processes
//@ needs-subprocess
fn main() {
unreachable!()

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:explicit panic
//@ ignore-emscripten no processes
//@ needs-subprocess
fn f() -> ! {
panic!()

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:explicit panic
//@ ignore-emscripten no processes
//@ needs-subprocess
fn main() {
let _x = match true {

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:explicit panic
//@ ignore-emscripten no processes
//@ needs-subprocess
#![allow(unreachable_code)]
#![allow(unused_variables)]

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:quux
//@ ignore-emscripten no processes
//@ needs-subprocess
fn f() -> ! {
panic!("quux")

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:squirrelcupcake
//@ ignore-emscripten no processes
//@ needs-subprocess
fn cmp() -> isize {
match (Some('a'), None::<char>) {

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:diverging_fn called
//@ ignore-emscripten no processes
//@ needs-subprocess
fn diverging_fn() -> ! {
panic!("diverging_fn called")

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -2,7 +2,7 @@
//@ run-fail
//@ error-pattern:aah!
//@ ignore-emscripten no processes
//@ needs-subprocess
fn call_another_fn<T, F: FnOnce() -> T>(f: F) -> T {
f()

View file

@ -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![];

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:attempt to divide by zero
//@ ignore-emscripten no processes
//@ needs-subprocess
#[allow(unconditional_panic)]
fn main() {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:explicit panic
//@ ignore-emscripten no processes
//@ needs-subprocess
fn a() {}

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:explicit panic
//@ ignore-emscripten no processes
//@ needs-subprocess
fn build() -> Vec<isize> {
panic!();

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:explicit panic
//@ ignore-emscripten no processes
//@ needs-subprocess
fn build1() -> Vec<isize> {
vec![0, 0, 0, 0, 0, 0, 0]

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:explicit panic
//@ ignore-emscripten no processes
//@ needs-subprocess
fn failfn() {
panic!();

View file

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

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:meep
//@ ignore-emscripten no processes
//@ needs-subprocess
fn f(_a: isize, _b: isize, _c: Box<isize>) {
panic!("moop");

View file

@ -2,7 +2,7 @@
//@ run-fail
//@ error-pattern:One
//@ ignore-emscripten no processes
//@ needs-subprocess
fn main() {
panic!("One");

View file

@ -4,7 +4,7 @@
//@ run-fail
//@ error-pattern:wooooo
//@ ignore-emscripten no processes
//@ needs-subprocess
fn main() {
let mut a = 1;

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:explicit
//@ ignore-emscripten no processes
//@ needs-subprocess
fn main() {
panic!();

View file

@ -1,6 +1,6 @@
//@ run-fail
//@ error-pattern:meh
//@ ignore-emscripten no processes
//@ needs-subprocess
fn main() {
let str_var: String = "meh".to_string();

Some files were not shown because too many files have changed in this diff Show more