Skip to content

unit test failures on s390x machines #208

@alexanderkjall

Description

@alexanderkjall

When running the testsuite on an s390x machine I get failures like these:

111s thread 'tests::xeon_gold_6252::vendor_check' panicked at src/tests/xeon_gold_6252.rs:605:5:
111s assertion `left == right` failed
111s   left: "uneGIeniletn"
111s  right: "GenuineIntel"
111s stack backtrace:
111s    0: __rustc::rust_begin_unwind
111s              at /usr/src/rustc-1.90.0/library/std/src/panicking.rs:697:5
111s    1: core::panicking::panic_fmt
111s              at /usr/src/rustc-1.90.0/library/core/src/panicking.rs:75:14
111s    2: core::panicking::assert_failed_inner
111s              at /usr/src/rustc-1.90.0/library/core/src/panicking.rs:448:17
111s    3: core::panicking::assert_failed
111s              at /usr/src/rustc-1.90.0/library/core/src/panicking.rs:403:5
111s    4: raw_cpuid::tests::xeon_gold_6252::vendor_check
111s              at ./src/tests/xeon_gold_6252.rs:605:5
111s    5: raw_cpuid::tests::xeon_gold_6252::vendor_check::{{closure}}
111s              at ./src/tests/xeon_gold_6252.rs:602:18
111s    6: core::ops::function::FnOnce::call_once
111s              at /usr/src/rustc-1.90.0/library/core/src/ops/function.rs:253:5
111s    7: core::ops::function::FnOnce::call_once
111s              at /usr/src/rustc-1.90.0/library/core/src/ops/function.rs:253:5
111s note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
111s 
111s 
111s failures:
111s     tests::i7_12700k::brand_string
111s     tests::i7_12700k::vendor_check
111s     tests::ryzen_matisse::brand_string
111s     tests::ryzen_matisse::cache_info
111s     tests::ryzen_matisse::direct_cache_access
111s     tests::ryzen_matisse::extended_processor_and_feature_identifiers
111s     tests::ryzen_matisse::l1_tlb_cache
111s     tests::ryzen_matisse::perfmon_info
111s     tests::ryzen_matisse::processor_serial
111s     tests::ryzen_matisse::svm
111s     tests::ryzen_matisse::vendor_check
111s     tests::xeon_gold_6252::brand_string
111s     tests::xeon_gold_6252::vendor_check

Full test output here: https://ci.debian.net/data/autopkgtest/testing/s390x/r/rust-raw-cpuid/67009698/log.gz

It seems like the unsafe code in VendorInfo as_str doesn't work on BigEndian machines (understandable, as intel is small endian).

Would you like a pull request that gate's this functionality?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions