Also, there are tests in https://github.com/rust-lang/libc/archive/0.2.18.tar.gz but not in the 0.2.18 crate. I haven't managed to run them successfully yet.
It's supposed to work like this: $ cd libc-test $ cargo run I get Unknown error Permission denied. See also <https://github.com/rust-lang/libc/issues/486>