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

i#7245: Fix test race by using unique dirs #7246

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

derekbruening
Copy link
Contributor

Fixes a bug where the new tlb_simulator_v2p test used the same directory as the existing altbindir test. Both tests were then clobbering each other's files. This is solved by using unique names.

Further improves the altbindir test by dynamically removing the trace/ directory, since the test is supposed to test post-processing but wasn't if run more than once in the same build directory.

Fixes #7245

Fixes a bug where the new tlb_simulator_v2p test used the same
directory as the existing altbindir test.  Both tests were then
clobbering each other's files.  This is solved by using unique names.

Further improves the altbindir test by dynamically removing the trace/
directory, since the test is supposed to test post-processing but
wasn't if run more than once in the same build directory.

Fixes #7245
@derekbruening derekbruening requested a review from edeiana February 3, 2025 20:28
# We are fine with a static config-time creation of the directory and the
# first test run creating the trace/ files with subsequent test runs re-using
# those files, as this test targets the tlb simulator. If our srcdir had
# trace/ file we would just use those.
file(REMOVE_RECURSE ${locdir})
file(MAKE_DIRECTORY ${locdir})
file(COPY ${srcdir}/raw DESTINATION ${locdir}/)
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I thought every test had similar steps: set local dir, delete it, mkdir, copy files.
I didn't realize some tests do need clobbering.
Good catch, thanks!

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.

tool.drcacheoff.altbindir failing, suspect culprit is new tool.drcacheoff.tlb_simulator_v2p_basedir test
2 participants