[3.5] bpo-30675: Fix multiprocessing code in regrtest#2220
Merged
Conversation
Member
There was a problem hiding this comment.
Does it make sense to do this on subprocesses?
Member
Author
There was a problem hiding this comment.
I don't think so. It's not done in worker processes in master neither, so I moved this code out of setup_tests() again.
Member
There was a problem hiding this comment.
use_resources is not passed.
Member
Author
There was a problem hiding this comment.
Oh, nice catch, fixed.
It's a bug in my change. I copied the runtest() call from above, but above, there is a first "support.use_resources = ns.use_resources" call.
* Rewrite code to pass slaveargs from the master process to worker processes: reuse the same code of the Python master branch * Move code to initialize tests in a new setup_tests() function, similar change was done in the master branch * In a worker process, call setup_tests() with the namespace built from slaveargs to initialize correctly tests Before this change, warm_caches() was not called in worker processes because the setup was done before rebuilding the namespace from slaveargs. As a consequence, the huntrleaks feature was unstable. For example, test_zipfile reported randomly false positive on reference leaks.
Member
Author
|
I fixed the two bugs that you spotted @serhiy-storchaka, thanks for your review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
processes: reuse the same code of the Python master branch
similar change was done in the master branch
from slaveargs to initialize correctly tests
Before this change, warm_caches() was not called in worker processes
because the setup was done before rebuilding the namespace from
slaveargs. As a consequence, the huntrleaks feature was unstable. For
example, test_zipfile reported randomly false positive on reference
leaks.