Skip to content

Fix an issue with parallel tests potentially clashing#468

Merged
whyitfor merged 2 commits into
redballoonsecurity:masterfrom
ANogin:bugfix/patch_maker_test_clash
Jun 6, 2024
Merged

Fix an issue with parallel tests potentially clashing#468
whyitfor merged 2 commits into
redballoonsecurity:masterfrom
ANogin:bugfix/patch_maker_test_clash

Conversation

@ANogin
Copy link
Copy Markdown
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
Copy Markdown
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
@ANogin ANogin deleted the bugfix/patch_maker_test_clash branch June 6, 2024 14:59
ANogin pushed 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