-
-
Notifications
You must be signed in to change notification settings - Fork 30
Test gz api with miri
#431
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 6 files with indirect coverage changes 🚀 New features to boost your workflow:
|
1c60715 to
9438e98
Compare
The C source assumes that when a write succeeds it writes all bytes. that is not strictly required, but effectively true in most cases where zlib is used. However, miri does not respect this. So when running miri, explicitly loop until all bytes are written
libz-rs-sys-cdylib/src/gz.rs
Outdated
|
|
||
| /// Deal with miri often not writing the full buffer in one go. That is valid, but zlib assumes | ||
| /// that writes are to true files and succeed unless e.g. the disk is full. | ||
| #[cfg(miri)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can disable this behavior using -Zmiri-no-short-fd-operations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, that is nicer.
No description provided.