diff options
author | Alan Somers <asomers@gmail.com> | 2020-12-08 20:36:19 -0700 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2020-12-08 20:36:19 -0700 |
commit | b50a92b0c99dd99efce9594d8231d3d4370d962b (patch) | |
tree | 590a77a94c84da904009b9c3f2e0ac10ccaa88da /test/sys | |
parent | 1c757c78baca8bd53309b625acbe86814c1de74c (diff) | |
download | nix-b50a92b0c99dd99efce9594d8231d3d4370d962b.zip |
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.
Diffstat (limited to 'test/sys')
-rw-r--r-- | test/sys/test_aio.rs | 7 |
1 files changed, 6 insertions, 1 deletions
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)) { |