There was a problem hiding this comment.
Does it make sense to do this on subprocesses?
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.
There was a problem hiding this comment.
use_resources is not passed.
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.
|
I fixed the two bugs that you spotted @serhiy-storchaka, thanks for your review. |
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.