summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2020-12-08 20:36:19 -0700
committerAlan Somers <asomers@gmail.com>2020-12-08 20:36:19 -0700
commitb50a92b0c99dd99efce9594d8231d3d4370d962b (patch)
tree590a77a94c84da904009b9c3f2e0ac10ccaa88da
parent1c757c78baca8bd53309b625acbe86814c1de74c (diff)
downloadnix-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.
-rw-r--r--test/sys/test_aio.rs7
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)) {