38cf5b15c6
Since these are defined in C as macros, they must be reimplemented in libc as Rust functions. They're hard to get exactly right, and they vary from platform to platform. The test builds custom C code that uses the real macros, and compares its output to the Rust versions' output for various inputs. Skip the CMSG_NXTHDR test on sparc64 linux because it hits a Bus Error. Issue #1239 Skip the entire cmsg test program on s390x because it dumps core seemingly before the kernel finishes booting. Issue #1240
35 lines
553 B
TOML
35 lines
553 B
TOML
[package]
|
|
name = "libc-test"
|
|
version = "0.1.0"
|
|
authors = ["Alex Crichton <alex@alexcrichton.com>"]
|
|
build = "build.rs"
|
|
|
|
[dependencies.libc]
|
|
path = ".."
|
|
default-features = false
|
|
|
|
[build-dependencies]
|
|
cc = "1.0"
|
|
ctest = "0.2.8"
|
|
|
|
[features]
|
|
default = [ "use_std" ]
|
|
use_std = [ "libc/use_std" ]
|
|
align = [ "libc/align" ]
|
|
extra_traits = [ "libc/extra_traits" ]
|
|
|
|
[[test]]
|
|
name = "main"
|
|
path = "test/main.rs"
|
|
harness = false
|
|
|
|
[[test]]
|
|
name = "linux-fcntl"
|
|
path = "test/linux_fcntl.rs"
|
|
harness = false
|
|
|
|
[[test]]
|
|
name = "cmsg"
|
|
path = "test/cmsg.rs"
|
|
harness = true
|