❯ cargo test --target x86_64-unknown-linux-gnu
warning: libc-test@0.1.0: /tmp/cargo-target/x86_64-unknown-linux-gnu/debug/build/libc-test-9499fdd4b5844934/out/ctest_output.c: In function 'ctest_roundtrip__af_alg_iv':
warning: libc-test@0.1.0: /tmp/cargo-target/x86_64-unknown-linux-gnu/debug/build/libc-test-9499fdd4b5844934/out/ctest_output.c:60204:1: note: the ABI of passing struct with a flexible array member has changed in GCC 4.4
warning: libc-test@0.1.0: 60204 | ) {
warning: libc-test@0.1.0: | ^
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.02s
Running tests/cmsg.rs (/tmp/cargo-target/x86_64-unknown-linux-gnu/debug/deps/cmsg-9e43bd2754098e34)
running 5 tests
test t::test_cmsg_firsthdr ... ok
test t::test_cmsg_len ... ok
test t::test_cmsg_data ... ok
test t::test_cmsg_space ... ok
test t::test_cmsg_nxthdr ... ok
test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running tests/ctest.rs (/tmp/cargo-target/x86_64-unknown-linux-gnu/debug/deps/ctest-836d91dc30a213df)
RUNNING ALL TESTS
bad `SW_MAX` value at byte 0: rust: 16 (0x10) != c 17 (0x11)
rust bytes: 10 00
c bytes: 11 00
bad `SW_CNT` value at byte 0: rust: 17 (0x11) != c 18 (0x12)
rust bytes: 11 00 00 00 00 00 00 00
c bytes: 12 00 00 00 00 00 00 00
bad `MS_NOUSER` value at byte 4: rust: 255 (0xff) != c 0 (0x0)
rust bytes: 00 00 00 80 ff ff ff ff
c bytes: 00 00 00 80 00 00 00 00
bad `tcp_info` size: rust: 104 != c 280
bad `tcp_info` align: rust: 4 != c 8
size of `struct tcp_info` is 280 in C and 104 in Rust
thread 'main' (1205036) panicked at /tmp/cargo-target/x86_64-unknown-linux-gnu/debug/build/libc-test-9499fdd4b5844934/out/ctest_output.rs:226625:9:
some tests failed
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: test failed, to rerun pass `--test ctest`
Same results on
riscv64gc-unknown-linux-gnu.