CasperLabs / datasize-rs

Heap memory usage estimation
Other
16 stars 13 forks source link

test suite failing on armhf, armel, i386 arch #19

Open tenzap opened 6 months ago

tenzap commented 6 months ago

The testsuite of your package is failing on some architectures armhf, armel, i386 while it runs fine on amd64 arm64 ppc64el, 390x

https://ci.debian.net/packages/r/rust-datasize/testing/i386/40116329/

test std::tests::test_nested_detailed_struct ... FAILED
119s 
119s failures:
119s 
119s ---- std::tests::test_nested_detailed_struct stdout ----
119s thread 'std::tests::test_nested_detailed_struct' panicked at 'assertion failed: `(left == right)`
119s   left: `Detailed({"c": Size(0), "a": Size(16), "b": Detailed({"dummy": Size(0), "value": Size(8)})})`,
119s  right: `Detailed({"c": Size(0), "a": Size(24), "b": Detailed({"value": Size(8), "dummy": Size(0)})})`', src/std.rs:492:9
119s stack backtrace:
119s    0: rust_begin_unwind
119s              at /usr/src/rustc-1.70.0/library/std/src/panicking.rs:578:5
119s    1: core::panicking::panic_fmt
119s              at /usr/src/rustc-1.70.0/library/core/src/panicking.rs:67:14
119s    2: core::panicking::assert_failed_inner
119s    3: core::panicking::assert_failed
119s              at /usr/src/rustc-1.70.0/library/core/src/panicking.rs:228:5
119s    4: datasize::std::tests::test_nested_detailed_struct
119s              at ./src/std.rs:492:9
119s    5: datasize::std::tests::test_nested_detailed_struct::{{closure}}
119s              at ./src/std.rs:450:38
119s    6: core::ops::function::FnOnce::call_once
119s              at /usr/src/rustc-1.70.0/library/core/src/ops/function.rs:250:5
119s    7: core::ops::function::FnOnce::call_once
119s              at /usr/src/rustc-1.70.0/library/core/src/ops/function.rs:250:5
119s note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
119s 
119s 
119s failures:
119s     std::tests::test_nested_detailed_struct

https://ci.debian.net/packages/r/rust-datasize/testing/armhf/40116155/

31s test std::tests::test_nested_detailed_struct ... FAILED
131s 
131s failures:
131s 
131s ---- std::tests::test_nested_detailed_struct stdout ----
131s thread 'std::tests::test_nested_detailed_struct' panicked at 'assertion failed: `(left == right)`
131s   left: `Detailed({"a": Size(16), "b": Detailed({"value": Size(8), "dummy": Size(0)}), "c": Size(0)})`,
131s  right: `Detailed({"a": Size(24), "b": Detailed({"dummy": Size(0), "value": Size(8)}), "c": Size(0)})`', src/std.rs:492:9
131s stack backtrace:
131s    0: rust_begin_unwind
131s              at /usr/src/rustc-1.70.0/library/std/src/panicking.rs:578:5
131s    1: core::panicking::panic_fmt
131s              at /usr/src/rustc-1.70.0/library/core/src/panicking.rs:67:14
131s    2: core::panicking::assert_failed_inner
131s    3: core::panicking::assert_failed
131s              at /usr/src/rustc-1.70.0/library/core/src/panicking.rs:228:5
131s    4: datasize::std::tests::test_nested_detailed_struct
131s              at ./src/std.rs:492:9
131s    5: datasize::std::tests::test_nested_detailed_struct::{{closure}}
131s              at ./src/std.rs:450:38
131s    6: core::ops::function::FnOnce::call_once
131s              at /usr/src/rustc-1.70.0/library/core/src/ops/function.rs:250:5
131s    7: core::ops::function::FnOnce::call_once
131s              at /usr/src/rustc-1.70.0/library/core/src/ops/function.rs:250:5
131s note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
131s 
131s 
131s failures:
131s     std::tests::test_nested_detailed_struct

https://ci.debian.net/packages/r/rust-libheif-rs/testing/arm64/39958911/

122s test std::tests::test_nested_detailed_struct ... FAILED
122s 
122s failures:
122s 
122s ---- std::tests::test_nested_detailed_struct stdout ----
122s thread 'std::tests::test_nested_detailed_struct' panicked at 'assertion failed: `(left == right)`
122s   left: `Detailed({"c": Size(0), "b": Detailed({"dummy": Size(0), "value": Size(8)}), "a": Size(16)})`,
122s  right: `Detailed({"a": Size(24), "b": Detailed({"value": Size(8), "dummy": Size(0)}), "c": Size(0)})`', src/std.rs:492:9
122s stack backtrace:
122s    0: rust_begin_unwind
122s              at /usr/src/rustc-1.70.0/library/std/src/panicking.rs:578:5
122s    1: core::panicking::panic_fmt
122s              at /usr/src/rustc-1.70.0/library/core/src/panicking.rs:67:14
122s    2: core::panicking::assert_failed_inner
122s    3: core::panicking::assert_failed
122s              at /usr/src/rustc-1.70.0/library/core/src/panicking.rs:228:5
122s    4: datasize::std::tests::test_nested_detailed_struct
122s              at ./src/std.rs:492:9
122s    5: datasize::std::tests::test_nested_detailed_struct::{{closure}}
122s              at ./src/std.rs:450:38
122s    6: core::ops::function::FnOnce::call_once
122s              at /usr/src/rustc-1.70.0/library/core/src/ops/function.rs:250:5
122s    7: core::ops::function::FnOnce::call_once
122s              at /usr/src/rustc-1.70.0/library/core/src/ops/function.rs:250:5
122s note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
122s 
122s 
122s failures:
122s     std::tests::test_nested_detailed_struct
122s 
122s test result: FAILED. 23 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
122s 
marc-casperlabs commented 6 months ago

It seems some sizes/alignments that differ on archs are not correctly taken into account. Are you currently using this library on these platforms? Nevermind, I see it is because of debian packaging.

I can look into a fix, but not before 2024 :)

tenzap commented 5 months ago

Did you have some time to have a look?

tenzap commented 1 month ago

@marc-casperlabs, kind reminder for this issue. The issue starts blocking other rust packages (pdf, istring).