cfg_select! { target_os = "linux" => {
mod linux {
    use dope_futures::listener::Listener;
    use dope_futures::stream::Stream;
    use dope_transport::Tcp;
    use dope_runtime::executor::{block_on, spawn};

    const ACCEPTS: usize = 64;

    #[test]
    fn multishot_accept_many_connections() {
        let mut listener = Listener::<Tcp>::bind("127.0.0.1:0").unwrap();
        let addr = listener.local_addr().unwrap();

        block_on(async move {
            let server = spawn(async move {
                for _ in 0..ACCEPTS {
                    let (_tcp, _peer) = listener.accept().await.expect("accept");
                }
            });

            for _ in 0..ACCEPTS {
                let _ = Stream::<Tcp>::connect_with(addr).await.expect("connect");
            }

            server.await;
        });
    }
}
} _ => {} }
