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 failures on i686-unknown-linux-gnu #134

Closed
decathorpe opened this issue Aug 9, 2024 · 3 comments · Fixed by #139
Closed

test failures on i686-unknown-linux-gnu #134

decathorpe opened this issue Aug 9, 2024 · 3 comments · Fixed by #139

Comments

@decathorpe
Copy link
Contributor

I'm working on packaging zlib-rs for Fedora Linux as a dependency of rustls and flate2.

I'm getting test failures on i686-unknown-linux-gnu (our only still-somewhat-supported 32-bit architecture):

---- deflate::test::compress_paper_100k stdout ----
thread 'deflate::test::compress_paper_100k' panicked at src/deflate.rs:3638:13:
assertion `left == right` failed
(exact diff excluded because very long)
---- deflate::test::compress_lcet10 stdout ----
thread 'deflate::test::compress_lcet10' panicked at src/deflate.rs:3638:13:
assertion `left == right` failed
(exact diff excluded because very long)

Full log:
cargo-test-i686.log

@folkertdev
Copy link
Collaborator

interesting. Is this the only test that fails?

our tests test byte-for-byte equivalence with zlib-ng. That is not a requirement, nor a hard promise that we've made, it's just easier for testing to have a "correct" output to aim for.

So if the rest of the test suite succeeds, the code is most likely correct, but our output just off in some places. the output should still be decodable by any compliant zlib implementation.

Nonetheless, it would be interesting to run our fuzzers for that target, to see if they can narrow down the test case. Maybe I can do that locally by cross-compiling the fuzzer? or do you have dedicated hardware that you could run fuzzers on for this target?

@decathorpe
Copy link
Contributor Author

Yes, these two are the only tests that fail. The full output is in the attached file.

If you're doing a byte-for-byte comparison, I expect that the result might compress to equivalent data but be slightly different. We've seen issues like that with zlib-ng in Fedora before when we switched from zlib to zlib-ng.

Running tests targeting i686 should be relatively straightforward on x86_64. Usually adding --target i686-unknown-linux-gnu is enough to make it work after setting up the target with rustup.

@decathorpe
Copy link
Contributor Author

Thanks for looking into it!

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

Successfully merging a pull request may close this issue.

2 participants