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

Lock coverage files #259

Merged
merged 1 commit into from
Jul 27, 2022
Merged

Lock coverage files #259

merged 1 commit into from
Jul 27, 2022

Conversation

smoelius
Copy link
Contributor

This PR suggests a method for locking coverage files when writing to them.

Currently, there appears to be a race. Specifically, the tester crate runs test functions in separate threads, similar to how libtest does. Thus, the test functions' writes to the coverage file can become interleaved, causing the file to become corrupted.

I have observed corrupted coverage files while testing Clippy, and I suspect this to be the cause.

@Manishearth Manishearth merged commit 6b52ec9 into Manishearth:master Jul 27, 2022
@smoelius smoelius deleted the lock-coverage-files branch July 27, 2022 19:29
@smoelius
Copy link
Contributor Author

Thanks, @Manishearth.

@smoelius
Copy link
Contributor Author

@Manishearth Would it be possible to get a new release with this fix?

I suspect this bug was in part the cause of the recent rustup failure: https://github.com/rust-lang/rust-clippy/actions/runs/3106438892/jobs/5033324694#step:11:911

@Munksgaard
Copy link
Collaborator

@smoelius v0.9.0 has now been published and includes your fix :-)

Thanks for the contribution!

bors added a commit to rust-lang/rust-clippy that referenced this pull request Sep 23, 2022
Upgrade `compiletest-rs` dependency

From `0.8` to `0.9`.

The new version includes a [fix](Manishearth/compiletest-rs#259) for what I suspect was one cause of the recent rustup failure: https://github.com/rust-lang/rust-clippy/actions/runs/3106438892/jobs/5033324694#step:11:911

changelog: none
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 this pull request may close these issues.

3 participants