Skip to content

tests fail on i686 (likely 32-bit architectures in general) #1

Description

@decathorpe

I'm working on packaging this crate for Fedora Linux in order to be able to update ntpd-rs.

I found that the tests fail on i686. I have seen this particular kind of test failure before, when bindgen bindings were committed into git instead of generated at build-time with a build script. It's a bit unfortunate that bindgen generates architecture-specific test code, but that is likely unavoidable since known struct sizes / alignments are obtained from running clang ...

So if you want to keep these bindgen-generated tests committed into git, some conditional compilation for expected struct sizes / alignments will likely be required to make these tests pass - assuming that the values are actually wrong, and the tests not indicators of actual ABI issues, of course.

(...)
failures:
---- pps::bindgen_test_layout___kernel_fd_set stdout ----
thread 'pps::bindgen_test_layout___kernel_fd_set' panicked at src/pps.rs:64:5:
assertion `left == right` failed: Size of __kernel_fd_set
  left: 64
 right: 128
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- pps::bindgen_test_layout_pps_fdata stdout ----
thread 'pps::bindgen_test_layout_pps_fdata' panicked at src/pps.rs:372:5:
assertion `left == right` failed: Size of pps_fdata
  left: 60
 right: 64
---- pps::bindgen_test_layout_pps_kinfo stdout ----
thread 'pps::bindgen_test_layout_pps_kinfo' panicked at src/pps.rs:234:5:
assertion `left == right` failed: Size of pps_kinfo
  left: 44
 right: 48
---- pps::bindgen_test_layout_pps_kparams stdout ----
thread 'pps::bindgen_test_layout_pps_kparams' panicked at src/pps.rs:336:5:
assertion `left == right` failed: Alignment of pps_kparams
  left: 4
 right: 8
---- pps::bindgen_test_layout_pps_ktime stdout ----
thread 'pps::bindgen_test_layout_pps_ktime' panicked at src/pps.rs:163:5:
assertion `left == right` failed: Alignment of pps_ktime
  left: 4
 right: 8
failures:
    pps::bindgen_test_layout___kernel_fd_set
    pps::bindgen_test_layout_pps_fdata
    pps::bindgen_test_layout_pps_kinfo
    pps::bindgen_test_layout_pps_kparams
    pps::bindgen_test_layout_pps_ktime
test result: FAILED. 5 passed; 5 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
(...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions