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

Issue 1120 Cleaning up tmpdir's #6944

Merged
merged 3 commits into from
Jun 9, 2020
Merged

Conversation

piotrhm
Copy link
Contributor

@piotrhm piotrhm commented Mar 20, 2020

Hi,
I combined work done by @bitmuster and @caitelatte which close #1120. Solution is a proposition which addresses @RonnyPfannschmidt comments available here.

@piotrhm piotrhm changed the title Issue 1120 (Cleaning up tmpdir's) #6253 Issue 1120 (Cleaning up tmpdir's) Mar 20, 2020
@bluetech bluetech changed the title Issue 1120 (Cleaning up tmpdir's) Issue 1120 Cleaning up tmpdir's Mar 27, 2020
keep=keep,
consider_lock_dead_if_created_before=consider_lock_dead_if_created_before,
# Register a cleanup for program exit
atexit.register(
Copy link
Member

Choose a reason for hiding this comment

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

This might still fail because some pytest process will finish before others so they might still step in each others toes, I guess?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean one of the race condition cases mentioned in maybe_delete_a_numbered_dir()? I thought try_cleanup() invoked from cleanup_numbered_dir() is preventing from such case or at least we have some guarantees - based on comments from maybe_delete_a_numbered_dir().

@nicoddemus
Copy link
Member

@RonnyPfannschmidt gentle ping.

@nicoddemus
Copy link
Member

I guess this is very hard to add a test for right?

Rebased.

@nicoddemus nicoddemus merged commit 3de85a9 into pytest-dev:master Jun 9, 2020
@nicoddemus
Copy link
Member

Hi @piotrhm!

Thanks again and sorry for the long delay!

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.

Cleaning up tmpdir's
4 participants