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 an issue with parallel tests potentially clashing #468

Merged

Conversation

ANogin
Copy link
Contributor

@ANogin ANogin commented May 31, 2024

One sentence summary of this PR (This should go in the CHANGELOG!)
Fix an issue with parallel tests potentially clashing

Link to Related Issue(s)
N/A

Please describe the changes in your request.
The test_function_replacement_modifier in ofrak/ofrak_core/test_ofrak/components/test_patch_maker_component.py is configured to run several times, sometimes writing the same replaced_hello.out program. When running tests in parallel, this can create spurious failures if two tests try to write the output binary at the same time. This change introduces an inter-process file lock to avoid this.

Anyone you think should look at this, specifically?
Not sure

@whyitfor whyitfor self-requested a review June 6, 2024 02:31
Copy link
Contributor

@whyitfor whyitfor left a comment

Choose a reason for hiding this comment

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

LGTM

@whyitfor whyitfor merged commit 0a8d9c3 into redballoonsecurity:master Jun 6, 2024
5 checks passed
@ANogin ANogin deleted the bugfix/patch_maker_test_clash branch June 6, 2024 14:59
ANogin added a commit to ANogin/ofrak that referenced this pull request Aug 20, 2024
…rity#468)

* Fix an issue with parallel tests potentially clashing

* Run pre-commit
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