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

fix: Potential race for file access in DotTest #249

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

joweich
Copy link
Collaborator

@joweich joweich commented Nov 19, 2024

It appears like CI runs for DotTest fail non-deterministically. See recent runs of the coverage CI:

While I can't reproduce this locally, my suspicion is that multiple tests use "./test.dot" simultaneously, which then causes race conditions or file access conflicts due to concurrent write/read attempts to the same file path.
This PR provides a fix by making the filenames unique (683ed98).
f826ab6 increases cross-platform compatibility and should be unrelated to this issue.

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.59%. Comparing base (4dbde3d) to head (f826ab6).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #249   +/-   ##
=======================================
  Coverage   99.59%   99.59%           
=======================================
  Files          56       56           
  Lines        2738     2744    +6     
  Branches      135      135           
=======================================
+ Hits         2727     2733    +6     
  Misses         11       11           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joweich joweich marked this pull request as ready for review November 19, 2024 21:21
Copy link
Owner

@bobluppes bobluppes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for noticing this and addressing it!!

I am fairly confident that this was indeed a race condition. LGTM 🚀

@bobluppes bobluppes merged commit 84cc43b into main Nov 25, 2024
8 checks passed
@bobluppes bobluppes deleted the test/dot/filesystem-race branch November 25, 2024 19:38
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.

2 participants