From 0cc392e5fab3d046b2973f71998609181753e299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=9D=B0=E5=8F=8B=20Jieyou=20Xu=20=28Joe=29?= <39484203+jieyouxu@users.noreply.github.com> Date: Thu, 23 Jan 2025 16:16:03 +0800 Subject: [PATCH] tests: cleanup `tests/ui/process/sigpipe-should-be-ignored.rs` - Unwrap a must-use I/O result and remove `#![allow(unused_must_use)]`. - Replace `ignore-*` with `needs-subprocess`. --- tests/ui/process/sigpipe-should-be-ignored.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/ui/process/sigpipe-should-be-ignored.rs b/tests/ui/process/sigpipe-should-be-ignored.rs index 44785bee7f80..3dcf0117ae97 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()); }