Skip to content

Commit b50a92b

Browse files
committed
Fix unreliability in sys::test_aio::test_aio_suspend
On OSX, this test has begun to fail in CI on OSX. Presumably it's because aio_suspend was getting interrupted by a signal.
1 parent 1c757c7 commit b50a92b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/sys/test_aio.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,12 @@ fn test_aio_suspend() {
164164
loop {
165165
{
166166
let cbbuf = [&wcb, &rcb];
167-
assert!(aio_suspend(&cbbuf[..], Some(timeout)).is_ok());
167+
let r = aio_suspend(&cbbuf[..], Some(timeout));
168+
match r {
169+
Err(Error::Sys(Errno::EINTR)) => continue,
170+
Err(e) => panic!("aio_suspend returned {:?}", e),
171+
Ok(_) => ()
172+
};
168173
}
169174
if rcb.error() != Err(Error::from(Errno::EINPROGRESS)) &&
170175
wcb.error() != Err(Error::from(Errno::EINPROGRESS)) {

0 commit comments

Comments
 (0)