Relax test_close_during_select_ebadf

It failed for me on Linux.  Same as abf3f50bb9 (Relax test
`test_dup2_during_select_ebadf` (#11976), 2025-10-19).
This commit is contained in:
Johannes Altmanninger
2025-10-26 16:39:25 +01:00
parent 461670c36a
commit f331f6a8a9

View File

@@ -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.