Skip to content

test failures on 32bit architectures #357

@alexanderkjall

Description

@alexanderkjall

Hi, it seems that the isize/usize tests fails on i386, as can be seen here: https://ci.debian.net/data/autopkgtest/testing/i386/r/rust-borsh/64940473/log.gz

The failures are:


429s failures:
429s 
429s ---- roundtrip::test_primitives::test_isize_max stdout ----
429s ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
429s Snapshot file: tests/roundtrip/snapshots/tests__roundtrip__test_primitives__isize_max.snap
429s Snapshot: isize_max
429s Source: tests/roundtrip/test_primitives.rs:21
429s ────────────────────────────────────────────────────────────────────────────────
429s Expression: buf
429s ────────────────────────────────────────────────────────────────────────────────
429s -old snapshot
429s +new results
429s ────────────┬───────────────────────────────────────────────────────────────────
429s     1     1 │ [
429s     2     2 │     255,
429s     3     3 │     255,
429s     4     4 │     255,
429s     5       │-    255,
429s     6       │-    255,
429s     7       │-    255,
429s     8       │-    255,
429s     9     5 │     127,
429s           6 │+    0,
429s           7 │+    0,
429s           8 │+    0,
429s           9 │+    0,
429s    10    10 │ ]
429s ────────────┴───────────────────────────────────────────────────────────────────
429s 
429s thread 'roundtrip::test_primitives::test_isize_max' panicked at tests/roundtrip/test_primitives.rs:21:1:
429s called `Result::unwrap()` on an `Err` value: FileIo(Os { code: 13, kind: PermissionDenied, message: "Permission denied" }, "/usr/share/cargo/registry/borsh-1.5.7/tests/roundtrip/snapshots/tests__roundtrip__test_primitives__isize_max.snap.new")
429s stack backtrace:
429s    0: __rustc::rust_begin_unwind
429s              at /usr/src/rustc-1.87.0/library/std/src/panicking.rs:697:5
429s    1: core::panicking::panic_fmt
429s              at /usr/src/rustc-1.87.0/library/core/src/panicking.rs:75:14
429s    2: core::result::unwrap_failed
429s              at /usr/src/rustc-1.87.0/library/core/src/result.rs:1704:5
429s    3: core::result::Result<T,E>::unwrap
429s              at /usr/src/rustc-1.87.0/library/core/src/result.rs:1109:23
429s    4: tests::roundtrip::test_primitives::test_isize_max
429s              at ./tests/roundtrip/test_primitives.rs:11:13
429s    5: tests::roundtrip::test_primitives::test_isize_max::{{closure}}
429s              at ./tests/roundtrip/test_primitives.rs:6:24
429s    6: core::ops::function::FnOnce::call_once
429s              at /usr/src/rustc-1.87.0/library/core/src/ops/function.rs:250:5
429s    7: core::ops::function::FnOnce::call_once
429s              at /usr/src/rustc-1.87.0/library/core/src/ops/function.rs:250:5
429s note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
429s 
429s ---- roundtrip::test_primitives::test_isize_min stdout ----
429s ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
429s Snapshot file: tests/roundtrip/snapshots/tests__roundtrip__test_primitives__isize_min.snap
429s Snapshot: isize_min
429s Source: tests/roundtrip/test_primitives.rs:20
429s ────────────────────────────────────────────────────────────────────────────────
429s Expression: buf
429s ────────────────────────────────────────────────────────────────────────────────
429s -old snapshot
429s +new results
429s ────────────┬───────────────────────────────────────────────────────────────────
429s     1     1 │ [
429s     2     2 │     0,
429s     3     3 │     0,
429s     4     4 │     0,
429s     5       │-    0,
429s     6       │-    0,
429s     7       │-    0,
429s     8       │-    0,
429s     9     5 │     128,
429s           6 │+    255,
429s           7 │+    255,
429s           8 │+    255,
429s           9 │+    255,
429s    10    10 │ ]
429s ────────────┴───────────────────────────────────────────────────────────────────
429s 
429s thread 'roundtrip::test_primitives::test_isize_min' panicked at tests/roundtrip/test_primitives.rs:20:1:
429s called `Result::unwrap()` on an `Err` value: FileIo(Os { code: 13, kind: PermissionDenied, message: "Permission denied" }, "/usr/share/cargo/registry/borsh-1.5.7/tests/roundtrip/snapshots/tests__roundtrip__test_primitives__isize_min.snap.new")
429s stack backtrace:
429s    0: __rustc::rust_begin_unwind
429s              at /usr/src/rustc-1.87.0/library/std/src/panicking.rs:697:5
429s    1: core::panicking::panic_fmt
429s              at /usr/src/rustc-1.87.0/library/core/src/panicking.rs:75:14
429s    2: core::result::unwrap_failed
429s              at /usr/src/rustc-1.87.0/library/core/src/result.rs:1704:5
429s    3: core::result::Result<T,E>::unwrap
429s              at /usr/src/rustc-1.87.0/library/core/src/result.rs:1109:23
429s    4: tests::roundtrip::test_primitives::test_isize_min
429s              at ./tests/roundtrip/test_primitives.rs:11:13
429s    5: tests::roundtrip::test_primitives::test_isize_min::{{closure}}
429s              at ./tests/roundtrip/test_primitives.rs:6:24
429s    6: core::ops::function::FnOnce::call_once
429s              at /usr/src/rustc-1.87.0/library/core/src/ops/function.rs:250:5
429s    7: core::ops::function::FnOnce::call_once
429s              at /usr/src/rustc-1.87.0/library/core/src/ops/function.rs:250:5
429s note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
429s 
429s ---- roundtrip::test_primitives::test_usize_max stdout ----
429s ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
429s Snapshot file: tests/roundtrip/snapshots/tests__roundtrip__test_primitives__usize_max.snap
429s Snapshot: usize_max
429s Source: tests/roundtrip/test_primitives.rs:25
429s ────────────────────────────────────────────────────────────────────────────────
429s Expression: buf
429s ────────────────────────────────────────────────────────────────────────────────
429s -old snapshot
429s +new results
429s ────────────┬───────────────────────────────────────────────────────────────────
429s     2     2 │     255,
429s     3     3 │     255,
429s     4     4 │     255,
429s     5     5 │     255,
429s     6       │-    255,
429s     7       │-    255,
429s     8       │-    255,
429s     9       │-    255,
429s           6 │+    0,
429s           7 │+    0,
429s           8 │+    0,
429s           9 │+    0,
429s    10    10 │ ]
429s ────────────┴───────────────────────────────────────────────────────────────────
429s 
429s thread 'roundtrip::test_primitives::test_usize_max' panicked at tests/roundtrip/test_primitives.rs:25:1:
429s called `Result::unwrap()` on an `Err` value: FileIo(Os { code: 13, kind: PermissionDenied, message: "Permission denied" }, "/usr/share/cargo/registry/borsh-1.5.7/tests/roundtrip/snapshots/tests__roundtrip__test_primitives__usize_max.snap.new")
429s stack backtrace:
429s    0: __rustc::rust_begin_unwind
429s              at /usr/src/rustc-1.87.0/library/std/src/panicking.rs:697:5
429s    1: core::panicking::panic_fmt
429s              at /usr/src/rustc-1.87.0/library/core/src/panicking.rs:75:14
429s    2: core::result::unwrap_failed
429s              at /usr/src/rustc-1.87.0/library/core/src/result.rs:1704:5
429s    3: core::result::Result<T,E>::unwrap
429s              at /usr/src/rustc-1.87.0/library/core/src/result.rs:1109:23
429s    4: tests::roundtrip::test_primitives::test_usize_max
429s              at ./tests/roundtrip/test_primitives.rs:11:13
429s    5: tests::roundtrip::test_primitives::test_usize_max::{{closure}}
429s              at ./tests/roundtrip/test_primitives.rs:6:24
429s    6: core::ops::function::FnOnce::call_once
429s              at /usr/src/rustc-1.87.0/library/core/src/ops/function.rs:250:5
429s    7: core::ops::function::FnOnce::call_once
429s              at /usr/src/rustc-1.87.0/library/core/src/ops/function.rs:250:5
429s note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
429s 
429s 
429s failures:
429s     roundtrip::test_primitives::test_isize_max
429s     roundtrip::test_primitives::test_isize_min
429s     roundtrip::test_primitives::test_usize_max
429s 
429s test result: FAILED. 92 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.24s

I tried to look at the test code, but didn't see what was wrong. Would you say that this is just a test failure, or do this expose a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions