AIX: Only test addresses that are multiples of the size of cmsghdr#4916
Conversation
c7b3a6a to
9fd9f59
Compare
|
I'm sorry, but I don't understand how this makes sense. You say that AIX does not apply any padding, yet the payload is required to be a multiple of How do you otherwise deal with payloads that aren't multiples of exactly |
|
... Or in other words, to me it sounds like the AIX C implementation does apply padding, but the Rust implementation doesn't, hence the test failure. If so, then the solution shouldn't be to ignore the test values where the implementations differ, but rather fix the Rust implementation. This may be easier with setting the What kind of test failures were you getting? |
The AIX <sys/socket.h> defines So, the Rust |
The test failed with the following error: Where line 86 is: |
|
Thanks for the quick response. If you don't mind me asking, how does AIX's CMSG_SPACE C definition look like? |
|
|
Oh wow, interesting. So it's not that AIX supports unaligned access, but more so that it doesn't try to account for it at all.
If I'm reading that correctly, isn't the minimum alignment 4 bytes? Not cmsghdr's 16? Did the tests not work with That would explain a lot about how it doesn't affect AIX in practice. Can't think of any cmsg payload that isn't divisible to 4. |
|
Yes, |
…ghdr. (backport <rust-lang#4916>) (cherry picked from commit 85a3691)
Description
AIX does not apply any alignment or padding to ancillary data, and
CMSG_ALIGN()is a no-op. Therefore, we only test addresses that are multiples of the size ofcmsghdron AIX. The original condition for AIX was removed in f391df3, which led to the test failure.Sources
Checklist
libc-test/semverhave been updated*LASTor*MAXareincluded (see #3131)
cd libc-test && cargo test --target mytarget);especially relevant for platforms that may not be checked in CI