From b50a92b0c99dd99efce9594d8231d3d4370d962b Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Tue, 8 Dec 2020 20:36:19 -0700 Subject: 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. --- test/sys/test_aio.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/sys') diff --git a/test/sys/test_aio.rs b/test/sys/test_aio.rs index 6b9bd911..37ad3257 100644 --- a/test/sys/test_aio.rs +++ b/test/sys/test_aio.rs @@ -164,7 +164,12 @@ fn test_aio_suspend() { loop { { let cbbuf = [&wcb, &rcb]; - assert!(aio_suspend(&cbbuf[..], Some(timeout)).is_ok()); + let r = aio_suspend(&cbbuf[..], Some(timeout)); + match r { + Err(Error::Sys(Errno::EINTR)) => continue, + Err(e) => panic!("aio_suspend returned {:?}", e), + Ok(_) => () + }; } if rcb.error() != Err(Error::from(Errno::EINPROGRESS)) && wcb.error() != Err(Error::from(Errno::EINPROGRESS)) { -- cgit v1.2.3