From ae743a976dcf4f44dd848429741ee85c4bbde54d Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Sat, 29 Mar 2025 17:11:41 +0100 Subject: [PATCH] test_stat: Disable test_stdin_pipe_fifo1/2 on Mac OS X It's not totally clear why they sometimes work, sometimes fail, but it does appear that running `stat` on `/dev/stdin` is perhaps not the most reliable approach. A likely more solid approach is described in #7583. --- tests/by-util/test_stat.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/by-util/test_stat.rs b/tests/by-util/test_stat.rs index ffe99bcb6..1bdab4c94 100644 --- a/tests/by-util/test_stat.rs +++ b/tests/by-util/test_stat.rs @@ -331,10 +331,16 @@ fn test_pipe_fifo() { .stdout_contains("File: FIFO"); } +// TODO(#7583): Re-enable on Mac OS X (and possibly other Unix platforms) #[test] #[cfg(all( unix, - not(any(target_os = "android", target_os = "freebsd", target_os = "openbsd")) + not(any( + target_os = "android", + target_os = "freebsd", + target_os = "openbsd", + target_os = "macos" + )) ))] fn test_stdin_pipe_fifo1() { // $ echo | stat - @@ -356,8 +362,9 @@ fn test_stdin_pipe_fifo1() { .stdout_contains("File: -"); } +// TODO(#7583): Re-enable on Mac OS X (and maybe Android) #[test] -#[cfg(all(unix, not(target_os = "android")))] +#[cfg(all(unix, not(any(target_os = "android", target_os = "macos"))))] fn test_stdin_pipe_fifo2() { // $ stat - // File: -