facebook / watchman

Watches files and records, or triggers actions, when they change.
https://facebook.github.io/watchman/
MIT License
12.72k stars 994 forks source link

serde_bser test failures on s390x #932

Open davide125 opened 3 years ago

davide125 commented 3 years ago

When building the serde_bser crate on s390x the tests fail:

     Running `/builddir/build/BUILD/serde_bser-0.3.1/target/release/deps/serde_bser-a361fde6f0fec587`
running 14 tests
test de::test::test_arrays ... FAILED
test de::test::test_arrays_untagged_enum ... FAILED
test de::test::test_bare_variant ... FAILED
test de::test::test_basic_array ... FAILED
test de::test::test_basic_object ... FAILED
test de::test::test_basic_tuple ... FAILED
test de::test::test_compact_arrays ... FAILED
test de::test::test_compact_arrays_untagged_enum ... FAILED
test de::test::test_newtype_variant ... FAILED
test de::test::test_struct_variant ... FAILED
test de::test::test_template ... FAILED
test de::test::test_tuple_variant ... FAILED
test de::test::test_unit_variant ... FAILED
test ser::test::test_basic_serialize ... FAILED
failures:
---- de::test::test_arrays stdout ----
thread 'de::test::test_arrays' panicked at 'called `Result::unwrap()` on an `Err` value: DeCustom { msg: "invalid value: integer `-32767`, expected u32" }', src/de/test.rs:418:62
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- de::test::test_arrays_untagged_enum stdout ----
thread 'de::test::test_arrays_untagged_enum' panicked at 'called `Result::unwrap()` on an `Err` value: DeCustom { msg: "data did not match any variant of untagged enum RequestResult" }', src/de/test.rs:463:14
---- de::test::test_bare_variant stdout ----
thread 'de::test::test_bare_variant' panicked at 'called `Result::unwrap()` on an `Err` value: DeEof { expected: 184549387, read: 22 }', src/de/test.rs:112:64
---- de::test::test_basic_array stdout ----
thread 'de::test::test_basic_array' panicked at 'called `Result::unwrap()` on an `Err` value: DeEof { expected: 285212683, read: 28 }', src/de/test.rs:67:62
---- de::test::test_basic_object stdout ----
thread 'de::test::test_basic_object' panicked at 'called `Result::unwrap()` on an `Err` value: DeEof { expected: 251658251, read: 26 }', src/de/test.rs:80:63
---- de::test::test_basic_tuple stdout ----
thread 'de::test::test_basic_tuple' panicked at 'called `Result::unwrap()` on an `Err` value: DeEof { expected: 285212683, read: 28 }', src/de/test.rs:98:61
---- de::test::test_compact_arrays stdout ----
thread 'de::test::test_compact_arrays' panicked at 'called `Result::unwrap()` on an `Err` value: DeCustom { msg: "invalid value: integer `-32767`, expected u32" }', src/de/test.rs:315:62
---- de::test::test_compact_arrays_untagged_enum stdout ----
thread 'de::test::test_compact_arrays_untagged_enum' panicked at 'called `Result::unwrap()` on an `Err` value: DeCustom { msg: "data did not match any variant of untagged enum RequestResult" }', src/de/test.rs:360:14
---- de::test::test_newtype_variant stdout ----
thread 'de::test::test_newtype_variant' panicked at 'called `Result::unwrap()` on an `Err` value: DeEof { expected: 436207627, read: 37 }', src/de/test.rs:138:64
---- de::test::test_struct_variant stdout ----
thread 'de::test::test_struct_variant' panicked at 'called `Result::unwrap()` on an `Err` value: DeEof { expected: 721420299, read: 54 }', src/de/test.rs:173:64
---- de::test::test_template stdout ----
thread 'de::test::test_template' panicked at 'called `Result::unwrap()` on an `Err` value: DeEof { expected: 671088651, read: 51 }', src/de/test.rs:220:76
---- de::test::test_tuple_variant stdout ----
thread 'de::test::test_tuple_variant' panicked at 'called `Result::unwrap()` on an `Err` value: DeEof { expected: 503316491, read: 41 }', src/de/test.rs:154:64
---- de::test::test_unit_variant stdout ----
thread 'de::test::test_unit_variant' panicked at 'called `Result::unwrap()` on an `Err` value: DeEof { expected: 251658251, read: 26 }', src/de/test.rs:124:64
---- ser::test::test_basic_serialize stdout ----
thread 'ser::test::test_basic_serialize' panicked at 'assertion failed: `(left == right)`
  left: `[0, 2, 0, 0, 0, 0, 4, 0, 203, 1, 3, 4, 13, 3, 9, 116, 101, 115, 116, 95, 108, 105, 115, 116, 0, 3, 5, 3, 3, 3, 4, 3, 42, 4, 3, 219, 5, 0, 8, 0, 0, 13, 3, 10, 116, 101, 115, 116, 95, 116, 117, 112, 108, 101, 0, 3, 2, 13, 3, 3, 102, 111, 111, 7, 64, 9, 33, 251, 84, 68, 45, 24, 13, 3, 9, 116, 101, 115, 116, 95, 101, 110, 117, 109, 13, 3, 8, 84, 101, 115, 116, 85, 110, 105, 116, 13, 3, 14, 116, 101, 115, 116, 95, 101, 110, 117, 109, 95, 108, 105, 115, 116, 0, 3, 3, 1, 3, 1, 13, 3, 11, 84, 101, 115, 116, 78, 101, 119, 116, 121, 112, 101, 2, 3, 9, 66, 83, 69, 82, 32, 116, 101, 115, 116, 1, 3, 1, 13, 3, 9, 84, 101, 115, 116, 84, 117, 112, 108, 101, 0, 3, 2, 3, 42, 6, 127, 255, 255, 255, 255, 255, 255, 255, 1, 3, 1, 13, 3, 10, 84, 101, 115, 116, 83, 116, 114, 117, 99, 116, 0, 3, 2, 13, 3, 3, 97, 98, 99, 10, 13, 3, 3, 100, 101, 102, 13, 3, 4, 240, 159, 146, 169]`,
 right: `[0, 2, 0, 0, 0, 0, 4, 203, 0, 1, 3, 4, 13, 3, 9, 116, 101, 115, 116, 95, 108, 105, 115, 116, 0, 3, 5, 3, 3, 3, 4, 3, 42, 4, 219, 3, 5, 0, 0, 8, 0, 13, 3, 10, 116, 101, 115, 116, 95, 116, 117, 112, 108, 101, 0, 3, 2, 13, 3, 3, 102, 111, 111, 7, 24, 45, 68, 84, 251, 33, 9, 64, 13, 3, 9, 116, 101, 115, 116, 95, 101, 110, 117, 109, 13, 3, 8, 84, 101, 115, 116, 85, 110, 105, 116, 13, 3, 14, 116, 101, 115, 116, 95, 101, 110, 117, 109, 95, 108, 105, 115, 116, 0, 3, 3, 1, 3, 1, 13, 3, 11, 84, 101, 115, 116, 78, 101, 119, 116, 121, 112, 101, 2, 3, 9, 66, 83, 69, 82, 32, 116, 101, 115, 116, 1, 3, 1, 13, 3, 9, 84, 101, 115, 116, 84, 117, 112, 108, 101, 0, 3, 2, 3, 42, 6, 255, 255, 255, 255, 255, 255, 255, 127, 1, 3, 1, 13, 3, 10, 84, 101, 115, 116, 83, 116, 114, 117, 99, 116, 0, 3, 2, 13, 3, 3, 97, 98, 99, 10, 13, 3, 3, 100, 101, 102, 13, 3, 4, 240, 159, 146, 169]`', src/ser/test.rs:50:5
failures:
    de::test::test_arrays
    de::test::test_arrays_untagged_enum
    de::test::test_bare_variant
    de::test::test_basic_array
    de::test::test_basic_object
    de::test::test_basic_tuple
    de::test::test_compact_arrays
    de::test::test_compact_arrays_untagged_enum
    de::test::test_newtype_variant
    de::test::test_struct_variant
    de::test::test_template
    de::test::test_tuple_variant
    de::test::test_unit_variant
    ser::test::test_basic_serialize
test result: FAILED. 0 passed; 14 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

You can find the full logs here: https://koji.fedoraproject.org/koji/taskinfo?taskID=72266370 (look at build.log).

chadaustin commented 2 years ago

I have no access to an S390x so I'll need you to investigate and patch this. Looks like an endianness issue.