]>
git.proxmox.com Git - rustc.git/blob - vendor/nix/test/sys/test_aio_drop.rs
1 // Test dropping an AioCb that hasn't yet finished.
2 // This must happen in its own process, because on OSX this test seems to hose
3 // the AIO subsystem and causes subsequent tests to fail
5 #[should_panic(expected = "Dropped an in-progress AioCb")]
7 not(target_env
= "musl"),
8 not(target_env
= "uclibc"),
13 target_os
= "freebsd",
19 use nix
::sys
::signal
::*;
20 use std
::os
::unix
::io
::AsRawFd
;
21 use tempfile
::tempfile
;
23 const WBUF
: &[u8] = b
"CDEF";
25 let f
= tempfile().unwrap();
26 f
.set_len(6).unwrap();
27 let mut aiocb
= Box
::pin(AioWrite
::new(
32 SigevNotify
::SigevNone
,
34 aiocb
.as_mut().submit().unwrap();