From f331f6a8a9ea52fe2c96a4d01f9ebb5d2466726b Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sun, 26 Oct 2025 16:39:25 +0100 Subject: [PATCH] Relax test_close_during_select_ebadf It failed for me on Linux. Same as abf3f50bb99 (Relax test `test_dup2_during_select_ebadf` (#11976), 2025-10-19). --- src/fd_monitor.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fd_monitor.rs b/src/fd_monitor.rs index f108822dc..7a25a4c33 100644 --- a/src/fd_monitor.rs +++ b/src/fd_monitor.rs @@ -665,8 +665,8 @@ fn test_close_during_select_ebadf() { // This is OK because we do not _depend_ on this behavior; the only // true requirement is that we don't panic in the handling code above. assert!( - is_wsl(WSL::V1) || matches!(result, Err(libc::EBADF) | Ok(1)), - "select/poll should have failed with EBADF or marked readable" + is_wsl(WSL::V1) || matches!(result, Err(libc::EBADF) | Ok(0 | 1)), + "select/poll should have failed with EBADF or timed out or the fd should be ready" ); } @@ -686,7 +686,7 @@ fn test_dup2_during_select_ebadf() { }; let result = do_something_bad_during_select(dup2_it); assert!( - matches!(result, Err(libc::EBADF) | Ok(0) | Ok(1)), + matches!(result, Err(libc::EBADF) | Ok(0 | 1)), "select/poll should have failed with EBADF or timed out or the fd should be ready" ); // Ensure these stay alive until after thread is joined.