Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test failures in linux tests on i386 due to alignment expectatin failures #191

Open
mjt0k opened this issue Apr 16, 2023 · 1 comment
Open
Labels
help wanted Extra attention is needed

Comments

@mjt0k
Copy link

mjt0k commented Apr 16, 2023

This one is somewhat fun: on i386, we have alignment expectations wrong:

---- linux::aio::test::bindgen_test_layout_iocb stdout ----
thread 'linux::aio::test::bindgen_test_layout_iocb' panicked at 'assertion failed: `(left == right)`
  left: `4`,
 right: `8`: Alignment ofIoControlBlock', src/linux/aio.rs:356:9

        assert_eq!(
            ::std::mem::align_of::(),
            8usize,
            concat!("Alignment of", stringify!(IoControlBlock))
        );

---- linux::aio::test::bindgen_test_layout_io_event stdout ----
thread 'linux::aio::test::bindgen_test_layout_io_event' panicked at 'assertion failed: `(left == right)`
  left: `4`,
 right: `8`: Alignment ofIoEvent', src/linux/aio.rs:342:9

        assert_eq!(
            ::std::mem::align_of::(),
            8usize,
            concat!("Alignment of", stringify!(IoEvent))
        );

---- linux::sock_ctrl_msg::tests::buffer_len stdout ----
thread 'linux::sock_ctrl_msg::tests::buffer_len' panicked at 'assertion failed: `(left == right)`
  left: `20`,
 right: `16`', src/linux/sock_ctrl_msg.rs:479:13

        assert_eq!(
            CMSG_SPACE!(size_of::()),
            size_of::() + size_of::()
        );

The last one also triggers on armhf (another issue I reported). Also, all of them has missing space, "Alignment ofIoEvent".

https://ci.debian.net/data/autopkgtest/testing/i386/r/rust-vmm-sys-util/32900927/log.gz

@andreeaflorescu andreeaflorescu added the help wanted Extra attention is needed label Apr 19, 2023
@plugwash
Copy link

plugwash commented May 6, 2023

This just seems to be a borked test. The type requiring the most alignment in the structure is a 64-bit integer, so the alignment of the overall structure will be the same as that of a 64-bit integer (which varies between architectures)

Patch at (along with issue 191) https://salsa.debian.org/rust-team/debcargo-conf/-/blob/1d296fda82959651ff7358066dcb4425941a2060/src/vmm-sys-util/debian/patches/fix-tests-32-bit.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants