Sha256: b05b58b3fc5253f389e1869ee6fc3833701572fb68ed57bf79237080dac3125d

Contents?: true

Size: 1001 Bytes

Versions: 5

Compression:

Stored size: 1001 Bytes

Contents

// Test dropping an AioCb that hasn't yet finished.
// This must happen in its own process, because on OSX this test seems to hose
// the AIO subsystem and causes subsequent tests to fail
#[test]
#[should_panic(expected = "Dropped an in-progress AioCb")]
#[cfg(all(not(target_env = "musl"),
          any(target_os = "linux",
              target_os = "ios",
              target_os = "macos",
              target_os = "freebsd",
              target_os = "netbsd")))]
fn test_drop() {
    use nix::sys::aio::*;
    use nix::sys::signal::*;
    use std::os::unix::io::AsRawFd;
    use tempfile::tempfile;

    const WBUF: &[u8] = b"CDEF";

    let f = tempfile().unwrap();
    f.set_len(6).unwrap();
    let mut aiocb = AioCb::from_slice( f.as_raw_fd(),
                           2,   //offset
                           WBUF,
                           0,   //priority
                           SigevNotify::SigevNone,
                           LioOpcode::LIO_NOP);
    aiocb.write().unwrap();
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wasmtime-6.0.1 ./ext/cargo-vendor/nix-0.23.2/test/sys/test_aio_drop.rs
wasmtime-6.0.0 ./ext/cargo-vendor/nix-0.23.2/test/sys/test_aio_drop.rs
wasmtime-5.0.0 ./ext/cargo-vendor/nix-0.23.2/test/sys/test_aio_drop.rs
wasmtime-0.4.1 ./ext/cargo-vendor/nix-0.23.2/test/sys/test_aio_drop.rs
wasmtime-0.4.0 ./ext/cargo-vendor/nix-0.23.2/test/sys/test_aio_drop.rs