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.