-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
This is my first time trying to contribute to anything, so please bear with me.
On the s390x platform there is a communication channel called IUCV. You've already got the AF_IUCV constant in libc. To use it though, we need a sockaddr_iucv struct. I've forked the repo, added the struct under linux_llike (since I can see it even on my x86 workstation, I figured this was the most appropriate place despite the fact I think it's only usable on s390x), and I've tested building it on both x86 and s390x.
I've also tested building a socket with it, and was successful in connecting and passing data through it.
I've read your contributing.md, and tried to run style.py and libc-tests, but both crash. However, it crashes in the same way when I try it from the libc repo without my changes, so I'm not sure how to address that. The crash I see in both cases for libc-tests is:
warning: libc-test@0.1.0: /home/clayton/Documents/Source/libc/target/debug/build/libc-test-6b45858fa8bc6248/out/ctest_output.c: In function 'ctest_roundtrip__af_alg_iv':
warning: libc-test@0.1.0: /home/clayton/Documents/Source/libc/target/debug/build/libc-test-6b45858fa8bc6248/out/ctest_output.c:59435:1: note: the ABI of passing struct with a flexible array member has changed in GCC 4.4
warning: libc-test@0.1.0: 59435 | ) {
warning: libc-test@0.1.0: | ^
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.03s
Running tests/cmsg.rs (/home/clayton/Documents/Source/libc/target/debug/deps/cmsg-1a4e9ce2a9635cfb)
running 5 tests
test t::test_cmsg_data ... ok
test t::test_cmsg_firsthdr ... ok
test t::test_cmsg_len ... 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 (/home/clayton/Documents/Source/libc/target/debug/deps/ctest-94ac2f2c6d32ba4b)
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
thread 'main' (151295) panicked at /home/clayton/Documents/Source/libc/target/debug/build/libc-test-6b45858fa8bc6248/out/ctest_output.rs:223991:9:
some tests failed
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: test failed, to rerun pass `--test ctest`
Given this, should I just go ahead and open a PR? I would like to get this into libc0.2 branch, since I'm planning to use it right away.
Please let me know how I should proceed, and apologies in advance if I've missed anything or misunderstood anything.