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

test_cratesio_hash fails on systems that are not little-endian 64-bit #10004

Closed
infinity0 opened this issue Oct 24, 2021 · 6 comments · Fixed by #10011
Closed

test_cratesio_hash fails on systems that are not little-endian 64-bit #10004

infinity0 opened this issue Oct 24, 2021 · 6 comments · Fixed by #10011
Labels
A-testing-cargo-itself Area: cargo's tests C-bug Category: bug

Comments

@infinity0
Copy link
Contributor

Problem

Not directly cargo's problem, but test_cratesio_hash is how I discovered the problem: rust-lang/rust#90230

Steps

No response

Possible Solution(s)

No response

Notes

No response

Version

No response

@infinity0 infinity0 added the C-bug Category: bug label Oct 24, 2021
@infinity0
Copy link
Contributor Author

It may be reasonable for rustc to not fix the underlying code of SipHasher as it is already a deprecated API; however from cargo's point of view it should decide what "StableHasher" actually means as the current implementation is bit-width- and endian-dependent and goes against intuitive notions of "Stable". In any case test_cratesio_hash should be adapted/fixed to address this situation.

For the time being I will just ignore the test failure in Debian, as the behaviour has apparently existed since 1.44 (cargo 0.45) without major complaints that I'm aware of.

@infinity0
Copy link
Contributor Author

CC @alexcrichton who wrote the test

@infinity0
Copy link
Contributor Author

rust-lang/rust#90230 was closed in favour of rust-lang/rust#74215

@alexcrichton
Copy link
Member

If this is little-endian dependent then seems like it's fine to rewrite the test or update it not be so.

@hkratz
Copy link
Contributor

hkratz commented Oct 25, 2021

As far as I understand the test comment it is not important that those hashes are the same across platforms so I have adjusted the expected values in #10011.

@infinity0
Copy link
Contributor Author

The naming "StableHasher" is misleading though.

@ehuss ehuss added the A-testing-cargo-itself Area: cargo's tests label Nov 6, 2021
@bors bors closed this as completed in e11cd81 Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testing-cargo-itself Area: cargo's tests C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants