diff -r 7ed3b4f830c0 Lib/test/regrtest.py --- a/Lib/test/regrtest.py Mon Jul 09 13:43:53 2012 -0700 +++ b/Lib/test/regrtest.py Tue Jul 10 19:51:21 2012 -0700 @@ -634,10 +634,14 @@ output.put((None, None, None, None)) return # -E is needed by some tests, e.g. test_import + # Running the child from the same working directory ensures + # that TEMPDIR for the child is the same when + # sysconfig.is_python_build() is true. See issue 15300. popen = Popen(base_cmd + ['--slaveargs', json.dumps(args_tuple)], stdout=PIPE, stderr=PIPE, universal_newlines=True, - close_fds=(os.name != 'nt')) + close_fds=(os.name != 'nt'), + cwd=support.SAVEDCWD) stdout, stderr = popen.communicate() retcode = popen.wait() # Strip last refcount output line if it exists, since it diff -r 7ed3b4f830c0 Misc/ACKS --- a/Misc/ACKS Mon Jul 09 13:43:53 2012 -0700 +++ b/Misc/ACKS Tue Jul 10 19:51:21 2012 -0700 @@ -505,6 +505,7 @@ Drew Jenkins Flemming Kjær Jensen MunSic Jeong +Chris Jerdonek Jim Jewett Orjan Johansen Fredrik Johansson diff -r 7ed3b4f830c0 Misc/NEWS --- a/Misc/NEWS Mon Jul 09 13:43:53 2012 -0700 +++ b/Misc/NEWS Tue Jul 10 19:51:21 2012 -0700 @@ -118,6 +118,10 @@ - Issue #15284: Skip {send,recv}msg tests in test_socket when IPv6 is not enabled. Patch by Brian Brazil. +- Issue #15300: Ensure the temporary test working directories are in the same + parent folder when running tests in multiprocess mode from a Python build. + Patch by Chris Jerdonek. + - Issue #15277: Fix a resource leak in support.py when IPv6 is disabled. Patch by Brian Brazil.