Comments (23)
---- ioread_api stdout ----
thread 'ioread_api' panicked at 'assertion failed: `(left == right)`
left: `0`,
right: `48879`', tests/api.rs:200:4
This happened on i686 now.
from scroll.
Can you provide more information?
I assume the s390x is a machine architecture? (i'm unfamiliar with it though, can you give a high level summary, pointer width, etc.)
Any other information you think might help would be great too, thanks!
from scroll.
s390x is architecture, yeah. This is big-endian one, 64bit. Interestingly, ppc64 succeeded so it might not be endianess issue.
But it seems that it is not related to s390x because tests are failing randomly: https://koji.fedoraproject.org/koji/taskinfo?taskID=23491063
from scroll.
Shit it read it backwards
from scroll.
Let me try now running all tests sequentially (instead of parallel as cargo does by default).
from scroll.
What version of scroll are you compiling? Those warnings i'm seeing in build logs should have been fixed
EDIT
Nvm, some aren't
from scroll.
@m4b that's latest release from crates.io -- 0.7.0
from scroll.
@ignatenkobrain ok that ioread failure is probably legitimate for i686 (stupid on my part):
let foo = bytes.ioread::<usize>().unwrap();
let bar = bytes.ioread::<u32>().unwrap();
the usize will be 32 bits on i686
from scroll.
Okay, now tried running tests sequentially:
x86_64
No failures.
ppc64le
No failures.
aarch64
No failures.
ppc64
---- tests::pread stdout ----
thread 'tests::pread' panicked at 'assertion failed: `(left == right)`
left: `61310`,
right: `32495`', src/lib.rs:225:8
i686
---- ioread_api stdout ----
thread 'ioread_api' panicked at 'assertion failed: `(left == right)`
left: `0`,
right: `48879`', tests/api.rs:200:4
s390x
---- tests::pread stdout ----
thread 'tests::pread' panicked at 'assertion failed: `(left == right)`
left: `61310`,
right: `32495`', src/lib.rs:225:8
armv7hl
---- ioread_api stdout ----
thread 'ioread_api' panicked at 'assertion failed: `(left == right)`
left: `0`,
right: `48879`', tests/api.rs:200:4
from scroll.
@m4b see results above. i686 and armv7hl are 32bit which explains your guess. s390x and ppc64 are big endian which also explains issue.
from scroll.
if its failing for big endian then endianness is totally broken which... is terrifying
from scroll.
Ok, I can fix the 32 failures; they are false alerts though.
However, endianness is scary; I suspect however it's related to this line: https://github.com//m4b/scroll/blob/a9bf9b591248a88f713cb1fa79eb0afff210cd0b/src/endian.rs#L24
Unfortunately I don't have a big endian system lying around :/
from scroll.
Also are you running the tests with --no-fail-fast
? This way can see all the failures and confirm my suspicion has to do with use of Default
from scroll.
Oh god, I'm stupid; of course it fails on big endian machines; the test is hardcoded to expect a little endian version :P
assert_eq!(0xef7e, byte);
from scroll.
also @ignatenkobrain thank you for reporting this issue and the extremely useful information, was very good to get these tests fixed cross-platform!
from scroll.
@m4b you are welcome, since I packaged scroll for Fedora I will open new issues as they appear on all those arches.
And thanks for quick fixing!
Hmm, s390x still fails, but now on:
---- cread_api stdout ----
thread 'cread_api' panicked at 'assertion failed: `(left == right)`
left: `72057594037927936`,
right: `1`', tests/api.rs:228:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- cread_api_customtype stdout ----
thread 'cread_api_customtype' panicked at 'assertion failed: `(left == right)`
left: `4022250974`,
right: `3735928559`', tests/api.rs:238:4
---- ioread_api stdout ----
thread 'ioread_api' panicked at 'assertion failed: `(left == right)`
left: `72057594037927936`,
right: `1`', tests/api.rs:199:4
from scroll.
So I finally got access to some s390x machine.. Here is --no-fail-fast:
[ignatenk@devel11 scroll]$ cargo test -j8 --no-fail-fast
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running target/debug/deps/scroll-27b4ccf0859558c3
running 41 tests
test leb128::tests::uleb128 ... ok
test leb128::tests::sleb128 ... ok
test leb128::tests::uleb_size ... ok
test tests::gread_f32 ... ok
test tests::gread_f64 ... ok
test tests::gread_gwrite_f32_1 ... ok
test tests::gread_gwrite_f32_2 ... ok
test tests::gread_gwrite_f32_3 ... ok
test tests::gread_gwrite_f64_1 ... ok
test tests::gread_gwrite_f64_2 ... ok
test tests::gread_gwrite_f64_3 ... ok
test tests::gread_gwrite_i32_1 ... ok
test tests::gread_gwrite_i32_2 ... ok
test tests::gread_gwrite_i32_3 ... ok
test leb128::tests::uleb128_overflow ... ok
test tests::gread_gwrite_i64_1 ... ok
test tests::gread_gwrite_i64_2 ... ok
test tests::gread_gwrite_i64_3 ... ok
test tests::gread_inout ... ok
test tests::gread_slice ... ok
test tests::gread_with_byte ... ok
test tests::gread_with_iter_bytes ... ok
test tests::pread ... ok
test tests::pread_slice ... ok
test tests::pread_str ... ok
test tests::pread_str_weird ... ok
test tests::pread_with_be ... ok
test tests::pread_with_iter_bytes ... ok
test tests::pwrite_and_pread_roundtrip_i16 ... ok
test tests::pwrite_and_pread_roundtrip_i32 ... ok
test tests::pwrite_and_pread_roundtrip_i64 ... ok
test tests::pwrite_and_pread_roundtrip_u16 ... ok
test tests::pwrite_and_pread_roundtrip_u32 ... ok
test tests::pwrite_and_pread_roundtrip_u64 ... ok
test tests::pwrite_str_and_bytes ... ok
test tests::simple_gread_i64 ... ok
test tests::simple_gread_u16 ... ok
test tests::simple_gread_u32 ... ok
test tests::simple_gread_u64 ... ok
test tests::test_measurable ... ok
test tests::test_measure_with_bytes ... ok
test result: ok. 41 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Running target/debug/deps/api-b529ebe7ee91f0fc
running 7 tests
test cread_api ... FAILED
test cread_api_badindex ... ok
test cread_api_customtype ... FAILED
test cwrite_api ... ok
test ioread_api ... FAILED
test lifetime_passthrough ... ok
test cwrite_api_customtype ... ok
failures:
---- cread_api stdout ----
thread 'cread_api' panicked at 'assertion failed: `(left == right)`
left: `72057594037927936`,
right: `1`', tests/api.rs:228:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- cread_api_customtype stdout ----
thread 'cread_api_customtype' panicked at 'assertion failed: `(left == right)`
left: `4022250974`,
right: `3735928559`', tests/api.rs:238:4
---- ioread_api stdout ----
thread 'ioread_api' panicked at 'assertion failed: `(left == right)`
left: `72057594037927936`,
right: `1`', tests/api.rs:199:4
failures:
cread_api
cread_api_customtype
ioread_api
test result: FAILED. 4 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out
Doc-tests scroll
running 26 tests
test src/greater.rs - greater::Cread::cread_with (line 41) ... ok
test src/ctx.rs - ctx (line 21) ... ok
test src/greater.rs - greater::Cread::cread (line 59) ... FAILED
test src/greater.rs - greater::Cread (line 11) ... FAILED
test src/greater.rs - greater::Cwrite (line 82) ... ok
test src/greater.rs - greater::Cwrite::cwrite (line 108) ... ok
test src/greater.rs - greater::Cwrite::cwrite_with (line 124) ... FAILED
test src/lesser.rs - lesser::IOread (line 12) ... FAILED
test src/lesser.rs - lesser::IOread::ioread (line 56) ... FAILED
test src/lesser.rs - lesser::IOread::ioread_with (line 76) ... ok
test src/lesser.rs - lesser::IOwrite::iowrite (line 115) ... FAILED
test src/lesser.rs - lesser::IOwrite::iowrite_with (line 136) ... ok
test src/lib.rs - (line 113) ... ok
test src/lib.rs - (line 76) ... ok
test src/lib.rs - (line 36) ... ok
test src/pread.rs - pread::Pread (line 14) ... FAILED
test src/pread.rs - pread::Pread (line 38) ... ok
test src/lib.rs - (line 91) ... ok
test src/pread.rs - pread::Pread::gread (line 116) ... ok
test src/pread.rs - pread::Pread::gread_inout (line 158) ... ok
test src/pread.rs - pread::Pread::gread_with (line 128) ... ok
test src/pread.rs - pread::Pread::pread (line 91) ... ok
test src/pread.rs - pread::Pread::gread_inout_with (line 183) ... ok
test src/pread.rs - pread::Pread::pread_with (line 101) ... ok
test src/pwrite.rs - pwrite::Pwrite::pwrite_with (line 44) ... ok
test src/pwrite.rs - pwrite::Pwrite (line 11) ... ok
failures:
---- src/greater.rs - greater::Cread::cread (line 59) stdout ----
thread 'rustc' panicked at 'test executable failed:
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `72057594037927936`,
right: `1`', src/greater.rs:8:0
note: Run with `RUST_BACKTRACE=1` for a backtrace.
', src/librustdoc/test.rs:315:16
---- src/greater.rs - greater::Cread (line 11) stdout ----
thread 'rustc' panicked at 'test executable failed:
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `4022250974`,
right: `3735928559`', src/greater.rs:21:0
note: Run with `RUST_BACKTRACE=1` for a backtrace.
', src/librustdoc/test.rs:315:16
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- src/greater.rs - greater::Cwrite::cwrite_with (line 124) stdout ----
thread 'rustc' panicked at 'test executable failed:
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `3026418949592973312`,
right: `42`', src/greater.rs:7:0
note: Run with `RUST_BACKTRACE=1` for a backtrace.
', src/librustdoc/test.rs:315:16
---- src/lesser.rs - lesser::IOread (line 12) stdout ----
thread 'rustc' panicked at 'test executable failed:
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `795729759161024512`,
right: `2827`', src/lesser.rs:30:0
note: Run with `RUST_BACKTRACE=1` for a backtrace.
', src/librustdoc/test.rs:315:16
---- src/lesser.rs - lesser::IOread::ioread (line 56) stdout ----
thread 'rustc' panicked at 'test executable failed:
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `48879`,
right: `61374`', src/lesser.rs:8:0
note: Run with `RUST_BACKTRACE=1` for a backtrace.
', src/librustdoc/test.rs:315:16
---- src/lesser.rs - lesser::IOwrite::iowrite (line 115) stdout ----
thread 'rustc' panicked at 'test executable failed:
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `[222, 173, 190, 239]`,
right: `[239, 190, 173, 222]`', src/lesser.rs:9:0
note: Run with `RUST_BACKTRACE=1` for a backtrace.
', src/librustdoc/test.rs:315:16
---- src/pread.rs - pread::Pread (line 14) stdout ----
thread 'rustc' panicked at 'test executable failed:
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `Foo(44510)`,
right: `Foo(57005)`', src/pread.rs:19:0
note: Run with `RUST_BACKTRACE=1` for a backtrace.
', src/librustdoc/test.rs:315:16
failures:
src/greater.rs - greater::Cread (line 11)
src/greater.rs - greater::Cread::cread (line 59)
src/greater.rs - greater::Cwrite::cwrite_with (line 124)
src/lesser.rs - lesser::IOread (line 12)
src/lesser.rs - lesser::IOread::ioread (line 56)
src/lesser.rs - lesser::IOwrite::iowrite (line 115)
src/pread.rs - pread::Pread (line 14)
test result: FAILED. 19 passed; 7 failed; 0 ignored; 0 measured; 0 filtered out
error: test failed, to rerun pass '--doc'
from scroll.
Ok, last list is great, will fix tomorrow, thanks so much for posting it here!
from scroll.
@ignatenkobrain I very likely missed one, put wrong BE number in, but I think this is close to fixing all tests and examples to run on BE host machines now.
Is it possible to run tests again? Once its all done I will likely push new crates.io
from scroll.
[ignatenk@devel11 scroll]$ cargo test -j8 --no-fail-fast
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running target/debug/deps/scroll-27b4ccf0859558c3
running 41 tests
test leb128::tests::uleb128 ... ok
test leb128::tests::uleb_size ... ok
test tests::gread_f64 ... ok
test tests::gread_f32 ... ok
test tests::gread_gwrite_f32_1 ... ok
test tests::gread_gwrite_f32_3 ... ok
test tests::gread_gwrite_f64_1 ... ok
test tests::gread_gwrite_f64_2 ... ok
test tests::gread_gwrite_f64_3 ... ok
test tests::gread_gwrite_i32_1 ... ok
test tests::gread_gwrite_i32_2 ... ok
test tests::gread_gwrite_i32_3 ... ok
test tests::gread_gwrite_i64_1 ... ok
test tests::gread_gwrite_i64_2 ... ok
test tests::gread_gwrite_i64_3 ... ok
test tests::gread_inout ... ok
test tests::gread_slice ... ok
test tests::gread_with_byte ... ok
test tests::gread_with_iter_bytes ... ok
test tests::pread ... ok
test tests::pread_slice ... ok
test tests::pread_str ... ok
test tests::pread_str_weird ... ok
test tests::pread_with_be ... ok
test tests::pread_with_iter_bytes ... ok
test tests::pwrite_and_pread_roundtrip_i16 ... ok
test tests::gread_gwrite_f32_2 ... ok
test tests::pwrite_and_pread_roundtrip_i32 ... ok
test leb128::tests::uleb128_overflow ... ok
test leb128::tests::sleb128 ... ok
test tests::pwrite_and_pread_roundtrip_u32 ... ok
test tests::pwrite_and_pread_roundtrip_u64 ... ok
test tests::pwrite_str_and_bytes ... ok
test tests::simple_gread_i64 ... ok
test tests::simple_gread_u16 ... ok
test tests::simple_gread_u32 ... ok
test tests::pwrite_and_pread_roundtrip_i64 ... ok
test tests::test_measure_with_bytes ... ok
test tests::pwrite_and_pread_roundtrip_u16 ... ok
test tests::test_measurable ... ok
test tests::simple_gread_u64 ... ok
test result: ok. 41 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Running target/debug/deps/api-b529ebe7ee91f0fc
running 7 tests
test cread_api_customtype ... FAILED
test cwrite_api_customtype ... ok
test ioread_api ... FAILED
test cwrite_api ... ok
test lifetime_passthrough ... ok
test cread_api_badindex ... ok
test cread_api ... FAILED
failures:
---- cread_api_customtype stdout ----
thread 'cread_api_customtype' panicked at 'assertion failed: `(left == right)`
left: `4022250974`,
right: `3735928559`', tests/api.rs:238:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- ioread_api stdout ----
thread 'ioread_api' panicked at 'assertion failed: `(left == right)`
left: `72057594037927936`,
right: `1`', tests/api.rs:199:4
---- cread_api stdout ----
thread 'cread_api' panicked at 'assertion failed: `(left == right)`
left: `72057594037927936`,
right: `1`', tests/api.rs:228:4
failures:
cread_api
cread_api_customtype
ioread_api
test result: FAILED. 4 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out
Doc-tests scroll
running 26 tests
test src/greater.rs - greater::Cread::cread (line 61) ... FAILED
test src/greater.rs - greater::Cread::cread_with (line 41) ... ok
test src/greater.rs - greater::Cread (line 11) ... ok
test src/ctx.rs - ctx (line 21) ... ok
test src/greater.rs - greater::Cwrite (line 91) ... ok
test src/greater.rs - greater::Cwrite::cwrite (line 118) ... FAILED
test src/greater.rs - greater::Cwrite::cwrite_with (line 142) ... ok
test src/lesser.rs - lesser::IOread (line 12) ... ok
test src/lesser.rs - lesser::IOread::ioread (line 56) ... FAILED
test src/lesser.rs - lesser::IOread::ioread_with (line 80) ... ok
test src/lesser.rs - lesser::IOwrite::iowrite (line 119) ... ok
test src/lesser.rs - lesser::IOwrite::iowrite_with (line 144) ... ok
test src/lib.rs - (line 36) ... ok
test src/lib.rs - (line 113) ... ok
test src/lib.rs - (line 91) ... ok
test src/lib.rs - (line 76) ... ok
test src/pread.rs - pread::Pread (line 14) ... ok
test src/pread.rs - pread::Pread (line 39) ... ok
test src/pread.rs - pread::Pread::gread_inout (line 159) ... ok
test src/pread.rs - pread::Pread::gread_inout_with (line 184) ... ok
test src/pread.rs - pread::Pread::gread (line 117) ... ok
test src/pread.rs - pread::Pread::gread_with (line 129) ... ok
test src/pwrite.rs - pwrite::Pwrite (line 11) ... ok
test src/pread.rs - pread::Pread::pread_with (line 102) ... ok
test src/pread.rs - pread::Pread::pread (line 92) ... ok
test src/pwrite.rs - pwrite::Pwrite::pwrite_with (line 44) ... ok
failures:
---- src/greater.rs - greater::Cread::cread (line 61) stdout ----
thread 'rustc' panicked at 'test executable failed:
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `4022206464`,
right: `61374`', src/greater.rs:16:0
note: Run with `RUST_BACKTRACE=1` for a backtrace.
', src/librustdoc/test.rs:315:16
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- src/greater.rs - greater::Cwrite::cwrite (line 118) stdout ----
thread 'rustc' panicked at 'test executable failed:
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `42`,
right: `3026418949592973312`', src/greater.rs:11:0
note: Run with `RUST_BACKTRACE=1` for a backtrace.
', src/librustdoc/test.rs:315:16
---- src/lesser.rs - lesser::IOread::ioread (line 56) stdout ----
thread 'rustc' panicked at 'test executable failed:
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `61419`,
right: `61374`', src/lesser.rs:12:0
note: Run with `RUST_BACKTRACE=1` for a backtrace.
', src/librustdoc/test.rs:315:16
failures:
src/greater.rs - greater::Cread::cread (line 61)
src/greater.rs - greater::Cwrite::cwrite (line 118)
src/lesser.rs - lesser::IOread::ioread (line 56)
test result: FAILED. 23 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out
error: test failed, to rerun pass '--doc'
commit f2d6dfc (HEAD -> master, origin/master, origin/HEAD)
from scroll.
@ignatenkobrain sorry this is terrible dev process but I think latest commit (c463655) should have fixed it, I hope I didn't miss anything :/
from scroll.
Yep, now finally fixed ;)
Thanks for cooperation!
from scroll.
Thanks for opening the issue !
from scroll.
Related Issues (20)
- derive newtypes?
- Generated Pread code is large/slow HOT 3
- derive(Pread) doesn't work with fields containing an array of structs HOT 6
- derive(Pread) in structs with elements that don't use scroll::Endian as ctx HOT 4
- remove usize pread/pwrite HOT 1
- scroll 1.0 HOT 12
- Repo in Cargo.toml for scroll_derive refers to old repo
- What does the "g" in "gread" stand for? HOT 3
- Publish new versions to crates.io HOT 4
- usize/isize impls must die HOT 1
- tests fail in README.md on published crates HOT 6
- Docs mention lost Gread and Gwrite traits HOT 3
- cargo test --no-default-features fails HOT 2
- Enums derive HOT 10
- Is it possible to do stateful parsing? HOT 2
- Pread, Pwrite with struct containing [u8; 8] do not work anymore with Rust 1.47.0 HOT 18
- src/lib.rs doctest fails on s390x / IBM System Z (big endian) HOT 7
- Writing into a dynamic container HOT 20
- `Pwrite`-ing to a Tokio BufWriter - is it possible?
- Pwrite deriving fails with "unparseable tokens" with struct containing lifetimes? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scroll.