Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

byteorder test fails on BE architectures #102

Closed
ignatenkobrain opened this issue Nov 10, 2017 · 1 comment
Closed

byteorder test fails on BE architectures #102

ignatenkobrain opened this issue Nov 10, 2017 · 1 comment

Comments

@ignatenkobrain
Copy link
Contributor

failures:
---- stdtests::prop_ext_int_1::native_endian stdout ----
	thread 'stdtests::prop_ext_int_1::native_endian' panicked at '[quickcheck] TEST FAILED. Arguments: (1)', /usr/share/cargo/registry/quickcheck-0.4.1/src/tester.rs:147:27
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- stdtests::prop_ext_int_2::native_endian stdout ----
	thread 'stdtests::prop_ext_int_2::native_endian' panicked at '[quickcheck] TEST FAILED. Arguments: (1)', /usr/share/cargo/registry/quickcheck-0.4.1/src/tester.rs:147:27
---- stdtests::prop_ext_int_3::native_endian stdout ----
	thread 'stdtests::prop_ext_int_3::native_endian' panicked at '[quickcheck] TEST FAILED. Arguments: (1)', /usr/share/cargo/registry/quickcheck-0.4.1/src/tester.rs:147:27
---- stdtests::prop_ext_int_4::native_endian stdout ----
	thread 'stdtests::prop_ext_int_4::native_endian' panicked at '[quickcheck] TEST FAILED. Arguments: (1)', /usr/share/cargo/registry/quickcheck-0.4.1/src/tester.rs:147:27
---- stdtests::prop_ext_int_5::native_endian stdout ----
	thread 'stdtests::prop_ext_int_5::native_endian' panicked at '[quickcheck] TEST FAILED. Arguments: (1)', /usr/share/cargo/registry/quickcheck-0.4.1/src/tester.rs:147:27
---- stdtests::prop_ext_int_6::native_endian stdout ----
	thread 'stdtests::prop_ext_int_6::native_endian' panicked at '[quickcheck] TEST FAILED. Arguments: (1)', /usr/share/cargo/registry/quickcheck-0.4.1/src/tester.rs:147:27
---- stdtests::prop_ext_int_7::native_endian stdout ----
	thread 'stdtests::prop_ext_int_7::native_endian' panicked at '[quickcheck] TEST FAILED. Arguments: (1)', /usr/share/cargo/registry/quickcheck-0.4.1/src/tester.rs:147:27
---- stdtests::prop_ext_uint_1::native_endian stdout ----
	thread 'stdtests::prop_ext_uint_1::native_endian' panicked at '[quickcheck] TEST FAILED. Arguments: (1)', /usr/share/cargo/registry/quickcheck-0.4.1/src/tester.rs:147:27
---- stdtests::prop_ext_uint_2::native_endian stdout ----
	thread 'stdtests::prop_ext_uint_2::native_endian' panicked at '[quickcheck] TEST FAILED. Arguments: (1)', /usr/share/cargo/registry/quickcheck-0.4.1/src/tester.rs:147:27
---- stdtests::prop_ext_uint_3::native_endian stdout ----
	thread 'stdtests::prop_ext_uint_3::native_endian' panicked at '[quickcheck] TEST FAILED. Arguments: (1)', /usr/share/cargo/registry/quickcheck-0.4.1/src/tester.rs:147:27
---- stdtests::prop_ext_uint_4::native_endian stdout ----
	thread 'stdtests::prop_ext_uint_4::native_endian' panicked at '[quickcheck] TEST FAILED. Arguments: (1)', /usr/share/cargo/registry/quickcheck-0.4.1/src/tester.rs:147:27
---- stdtests::prop_ext_uint_5::native_endian stdout ----
	thread 'stdtests::prop_ext_uint_5::native_endian' panicked at '[quickcheck] TEST FAILED. Arguments: (1)', /usr/share/cargo/registry/quickcheck-0.4.1/src/tester.rs:147:27
---- stdtests::prop_ext_uint_7::native_endian stdout ----
	thread 'stdtests::prop_ext_uint_7::native_endian' panicked at '[quickcheck] TEST FAILED. Arguments: (1)', /usr/share/cargo/registry/quickcheck-0.4.1/src/tester.rs:147:27
---- stdtests::prop_ext_uint_6::native_endian stdout ----
	thread 'stdtests::prop_ext_uint_6::native_endian' panicked at '[quickcheck] TEST FAILED. Arguments: (1)', /usr/share/cargo/registry/quickcheck-0.4.1/src/tester.rs:147:27
failures:
    stdtests::prop_ext_int_1::native_endian
    stdtests::prop_ext_int_2::native_endian
    stdtests::prop_ext_int_3::native_endian
    stdtests::prop_ext_int_4::native_endian
    stdtests::prop_ext_int_5::native_endian
    stdtests::prop_ext_int_6::native_endian
    stdtests::prop_ext_int_7::native_endian
    stdtests::prop_ext_uint_1::native_endian
    stdtests::prop_ext_uint_2::native_endian
    stdtests::prop_ext_uint_3::native_endian
    stdtests::prop_ext_uint_4::native_endian
    stdtests::prop_ext_uint_5::native_endian
    stdtests::prop_ext_uint_6::native_endian
    stdtests::prop_ext_uint_7::native_endian
test result: FAILED. 324 passed; 14 failed; 0 ignored; 0 measured; 0 filtered out

This one was from s390x machine.

@cuviper
Copy link
Contributor

cuviper commented Nov 13, 2017

The big_endian test creates a new rdr vector with just the later bytes, but the following native_endian test behaves just like the little_endian test -- which is inappropriate on actual big-endian machines.

cuviper added a commit to cuviper/byteorder that referenced this issue Nov 13, 2017
The similar `big_endian` tests were using an offset to read from the
end of the written `u64`, but the `native_endian` tests were reading
directly, just like the `little_endian` tests.  That's of course only
correct when the target actually is little endian.

That `big_endian` offset is now sliced directly, instead of cloning into
another vector, and then this logic is also used in the `native_endian`
test, depending on the current `#[cfg(target_endian)]`.

Fixes BurntSushi#102.
cuviper added a commit to cuviper/byteorder that referenced this issue Nov 13, 2017
The similar `big_endian` tests were using an offset to read from the
end of the written `u64`, but the `native_endian` tests were reading
directly, just like the `little_endian` tests.  That's of course only
correct when the target actually is little endian.

That `big_endian` offset is now sliced directly, instead of cloning into
another vector, and then this logic is also used in the `native_endian`
test, depending on the current `#[cfg(target_endian)]`.

Fixes BurntSushi#102.
BurntSushi pushed a commit that referenced this issue Nov 29, 2017
The similar `big_endian` tests were using an offset to read from the
end of the written `u64`, but the `native_endian` tests were reading
directly, just like the `little_endian` tests.  That's of course only
correct when the target actually is little endian.

That `big_endian` offset is now sliced directly, instead of cloning into
another vector, and then this logic is also used in the `native_endian`
test, depending on the current `#[cfg(target_endian)]`.

Fixes #102.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants