mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-23 21:31:14 -03:00
Relax test test_dup2_during_select_ebadf (#11976)
On MSYS/Cygwin, when select/poll wait on a descriptor and `dup2` is used to copy into that descriptor, they return the descriptor as "ready", unlike Linux (timeout) and MacOS (EBADF error). The test specifically checked for Linux and MaxOS behaviors, failing on Cygwin/MSYS. So relax it to also allow that behavior.
This commit is contained in:
committed by
Johannes Altmanninger
parent
20a6ac947b
commit
abf3f50bb9
@@ -232,8 +232,8 @@ fn test_dup2_during_select_ebadf() {
|
||||
};
|
||||
let result = do_something_bad_during_select(dup2_it);
|
||||
assert!(
|
||||
matches!(result, Err(libc::EBADF) | Ok(0)),
|
||||
"select/poll should have failed with EBADF or timed out"
|
||||
matches!(result, Err(libc::EBADF) | Ok(0) | Ok(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.
|
||||
drop(pipe_read);
|
||||
|
||||
Reference in New Issue
Block a user