bigdecimal-rs icon indicating copy to clipboard operation
bigdecimal-rs copied to clipboard

Test failures on i386 machines

Open alexanderkjall opened this issue 1 year ago • 2 comments

I tried to run the testsuite on an i386 machine, and got some test failures, the first one looks like a typical loss of precision problem that is common on i386.

The output of the failures are:

---- arithmetic::cbrt::test::test_cbrt_prec15 stdout ----
thread 'arithmetic::cbrt::test::test_cbrt_prec15' panicked at src/arithmetic/cbrt.rs:128:13:
assertion `left == right` failed
  left: BigDecimal(sign=Plus, scale=13, digits=[237574999999999])
 right: BigDecimal(sign=Plus, scale=4, digits=[237575])
stack backtrace:
   0: rust_begin_unwind
             at /usr/src/rustc-1.81.0/library/std/src/panicking.rs:665:5
   1: core::panicking::panic_fmt
             at /usr/src/rustc-1.81.0/library/core/src/panicking.rs:74:14
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
             at /usr/src/rustc-1.81.0/library/core/src/panicking.rs:365:5
   4: bigdecimal::arithmetic::cbrt::test::test_cbrt_prec15
             at ./src/arithmetic/cbrt.rs:128:13
   5: bigdecimal::arithmetic::cbrt::test::test_cbrt_prec15::{{closure}}
             at ./src/arithmetic/cbrt.rs:112:26
   6: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
   7: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

---- impl_serde::test::json_support::test_struct_parsing stdout ----
thread 'impl_serde::test::json_support::test_struct_parsing' panicked at src/impl_serde.rs:254:73:
called `Result::unwrap()` on an `Err` value: Error("invalid type: number, expected a number or formatted decimal string", line: 2, column: 60)
stack backtrace:
   0: rust_begin_unwind
             at /usr/src/rustc-1.81.0/library/std/src/panicking.rs:665:5
   1: core::panicking::panic_fmt
             at /usr/src/rustc-1.81.0/library/core/src/panicking.rs:74:14
   2: core::result::unwrap_failed
             at /usr/src/rustc-1.81.0/library/core/src/result.rs:1679:5
   3: core::result::Result<T,E>::unwrap
             at /usr/src/rustc-1.81.0/library/core/src/result.rs:1102:23
   4: bigdecimal::impl_serde::test::json_support::test_struct_parsing
             at ./src/impl_serde.rs:254:41
   5: bigdecimal::impl_serde::test::json_support::test_struct_parsing::{{closure}}
             at ./src/impl_serde.rs:250:33
   6: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
   7: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

---- impl_serde::test_jsonification::deserialize_f64::case_0d001 stdout ----
thread 'impl_serde::test_jsonification::deserialize_f64::case_0d001' panicked at src/impl_serde.rs:401:9:
should parse JSON: Error("invalid type: number, expected a number or formatted decimal string", line: 1, column: 5)
stack backtrace:
   0: rust_begin_unwind
             at /usr/src/rustc-1.81.0/library/std/src/panicking.rs:665:5
   1: core::panicking::panic_fmt
             at /usr/src/rustc-1.81.0/library/core/src/panicking.rs:74:14
   2: core::result::unwrap_failed
             at /usr/src/rustc-1.81.0/library/core/src/result.rs:1679:5
   3: core::result::Result<T,E>::expect
             at /usr/src/rustc-1.81.0/library/core/src/result.rs:1059:23
   4: bigdecimal::impl_serde::test_jsonification::deserialize_f64::case_0d001
             at ./src/impl_serde.rs:391:33
   5: bigdecimal::impl_serde::test_jsonification::deserialize_f64::case_0d001::{{closure}}
             at ./src/impl_serde.rs:389:27
   6: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
   7: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

---- impl_serde::test_jsonification::deserialize_f64::case_1d0 stdout ----
thread 'impl_serde::test_jsonification::deserialize_f64::case_1d0' panicked at src/impl_serde.rs:400:9:
should parse JSON: Error("invalid type: number, expected a number or formatted decimal string", line: 1, column: 3)
stack backtrace:
   0: rust_begin_unwind
             at /usr/src/rustc-1.81.0/library/std/src/panicking.rs:665:5
   1: core::panicking::panic_fmt
             at /usr/src/rustc-1.81.0/library/core/src/panicking.rs:74:14
   2: core::result::unwrap_failed
             at /usr/src/rustc-1.81.0/library/core/src/result.rs:1679:5
   3: core::result::Result<T,E>::expect
             at /usr/src/rustc-1.81.0/library/core/src/result.rs:1059:23
   4: bigdecimal::impl_serde::test_jsonification::deserialize_f64::case_1d0
             at ./src/impl_serde.rs:391:33
   5: bigdecimal::impl_serde::test_jsonification::deserialize_f64::case_1d0::{{closure}}
             at ./src/impl_serde.rs:389:27
   6: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
   7: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

---- impl_serde::test_jsonification::deserialize_f64::case_41009d2207etc stdout ----
thread 'impl_serde::test_jsonification::deserialize_f64::case_41009d2207etc' panicked at src/impl_serde.rs:402:9:
should parse JSON: Error("invalid type: number, expected a number or formatted decimal string", line: 1, column: 41)
stack backtrace:
   0: rust_begin_unwind
             at /usr/src/rustc-1.81.0/library/std/src/panicking.rs:665:5
   1: core::panicking::panic_fmt
             at /usr/src/rustc-1.81.0/library/core/src/panicking.rs:74:14
   2: core::result::unwrap_failed
             at /usr/src/rustc-1.81.0/library/core/src/result.rs:1679:5
   3: core::result::Result<T,E>::expect
             at /usr/src/rustc-1.81.0/library/core/src/result.rs:1059:23
   4: bigdecimal::impl_serde::test_jsonification::deserialize_f64::case_41009d2207etc
             at ./src/impl_serde.rs:391:33
   5: bigdecimal::impl_serde::test_jsonification::deserialize_f64::case_41009d2207etc::{{closure}}
             at ./src/impl_serde.rs:389:27
   6: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
   7: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

---- impl_serde::test_jsonification::serde_struct_decimals::case_1d0 stdout ----
thread 'impl_serde::test_jsonification::serde_struct_decimals::case_1d0' panicked at src/impl_serde.rs:440:9:
called `Result::unwrap()` on an `Err` value: Error("invalid type: number, expected a number or formatted decimal string", line: 1, column: 14)
stack backtrace:
   0: rust_begin_unwind
             at /usr/src/rustc-1.81.0/library/std/src/panicking.rs:665:5
   1: core::panicking::panic_fmt
             at /usr/src/rustc-1.81.0/library/core/src/panicking.rs:74:14
   2: core::result::unwrap_failed
             at /usr/src/rustc-1.81.0/library/core/src/result.rs:1679:5
   3: core::result::Result<T,E>::unwrap
             at /usr/src/rustc-1.81.0/library/core/src/result.rs:1102:23
   4: bigdecimal::impl_serde::test_jsonification::serde_struct_decimals::case_1d0
             at ./src/impl_serde.rs:426:44
   5: bigdecimal::impl_serde::test_jsonification::serde_struct_decimals::case_1d0::{{closure}}
             at ./src/impl_serde.rs:425:27
   6: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
   7: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

---- impl_serde::test_jsonification::serde_struct_decimals::case_2d01 stdout ----
thread 'impl_serde::test_jsonification::serde_struct_decimals::case_2d01' panicked at src/impl_serde.rs:441:9:
called `Result::unwrap()` on an `Err` value: Error("invalid type: number, expected a number or formatted decimal string", line: 1, column: 15)
stack backtrace:
   0: rust_begin_unwind
             at /usr/src/rustc-1.81.0/library/std/src/panicking.rs:665:5
   1: core::panicking::panic_fmt
             at /usr/src/rustc-1.81.0/library/core/src/panicking.rs:74:14
   2: core::result::unwrap_failed
             at /usr/src/rustc-1.81.0/library/core/src/result.rs:1679:5
   3: core::result::Result<T,E>::unwrap
             at /usr/src/rustc-1.81.0/library/core/src/result.rs:1102:23
   4: bigdecimal::impl_serde::test_jsonification::serde_struct_decimals::case_2d01
             at ./src/impl_serde.rs:426:44
   5: bigdecimal::impl_serde::test_jsonification::serde_struct_decimals::case_2d01::{{closure}}
             at ./src/impl_serde.rs:425:27
   6: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
   7: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

---- impl_serde::test_jsonification::serde_struct_decimals::case_50 stdout ----
thread 'impl_serde::test_jsonification::serde_struct_decimals::case_50' panicked at src/impl_serde.rs:442:9:
called `Result::unwrap()` on an `Err` value: Error("invalid type: integer `50`, expected a number or formatted decimal string", line: 1, column: 13)
stack backtrace:
   0: rust_begin_unwind
             at /usr/src/rustc-1.81.0/library/std/src/panicking.rs:665:5
   1: core::panicking::panic_fmt
             at /usr/src/rustc-1.81.0/library/core/src/panicking.rs:74:14
   2: core::result::unwrap_failed
             at /usr/src/rustc-1.81.0/library/core/src/result.rs:1679:5
   3: core::result::Result<T,E>::unwrap
             at /usr/src/rustc-1.81.0/library/core/src/result.rs:1102:23
   4: bigdecimal::impl_serde::test_jsonification::serde_struct_decimals::case_50
             at ./src/impl_serde.rs:426:44
   5: bigdecimal::impl_serde::test_jsonification::serde_struct_decimals::case_50::{{closure}}
             at ./src/impl_serde.rs:425:27
   6: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
   7: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

---- impl_serde::test_jsonification::serde_struct_decimals::case_high_prec stdout ----
thread 'impl_serde::test_jsonification::serde_struct_decimals::case_high_prec' panicked at src/impl_serde.rs:443:9:
called `Result::unwrap()` on an `Err` value: Error("invalid type: number, expected a number or formatted decimal string", line: 1, column: 52)
stack backtrace:
   0: rust_begin_unwind
             at /usr/src/rustc-1.81.0/library/std/src/panicking.rs:665:5
   1: core::panicking::panic_fmt
             at /usr/src/rustc-1.81.0/library/core/src/panicking.rs:74:14
   2: core::result::unwrap_failed
             at /usr/src/rustc-1.81.0/library/core/src/result.rs:1679:5
   3: core::result::Result<T,E>::unwrap
             at /usr/src/rustc-1.81.0/library/core/src/result.rs:1102:23
   4: bigdecimal::impl_serde::test_jsonification::serde_struct_decimals::case_high_prec
             at ./src/impl_serde.rs:426:44
   5: bigdecimal::impl_serde::test_jsonification::serde_struct_decimals::case_high_prec::{{closure}}
             at ./src/impl_serde.rs:425:27
   6: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
   7: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

---- impl_serde::test_jsonification::serde_struct_decimals::scale_out_of_bounds stdout ----
thread 'impl_serde::test_jsonification::serde_struct_decimals::scale_out_of_bounds' panicked at src/impl_serde.rs:457:13:
invalid type: number, expected a number or formatted decimal string at line 1 column 27
stack backtrace:
   0: rust_begin_unwind
             at /usr/src/rustc-1.81.0/library/std/src/panicking.rs:665:5
   1: core::panicking::panic_fmt
             at /usr/src/rustc-1.81.0/library/core/src/panicking.rs:74:14
   2: core::panicking::panic_display
             at /usr/src/rustc-1.81.0/library/core/src/panicking.rs:264:5
   3: bigdecimal::impl_serde::test_jsonification::serde_struct_decimals::scale_out_of_bounds
             at ./src/impl_serde.rs:457:13
   4: bigdecimal::impl_serde::test_jsonification::serde_struct_decimals::scale_out_of_bounds::{{closure}}
             at ./src/impl_serde.rs:449:33
   5: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
   6: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.81.0/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


failures:
    arithmetic::cbrt::test::test_cbrt_prec15
    impl_serde::test::json_support::test_struct_parsing
    impl_serde::test_jsonification::deserialize_f64::case_0d001
    impl_serde::test_jsonification::deserialize_f64::case_1d0
    impl_serde::test_jsonification::deserialize_f64::case_41009d2207etc
    impl_serde::test_jsonification::serde_struct_decimals::case_1d0
    impl_serde::test_jsonification::serde_struct_decimals::case_2d01
    impl_serde::test_jsonification::serde_struct_decimals::case_50
    impl_serde::test_jsonification::serde_struct_decimals::case_high_prec
    impl_serde::test_jsonification::serde_struct_decimals::scale_out_of_bounds

full output of the testsuite can be found here: https://ci.debian.net/packages/r/rust-bigdecimal/testing/i386/53414596/

alexanderkjall avatar Oct 22 '24 15:10 alexanderkjall