From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 4 May 2020 15:25:22 +0000 (-0700) Subject: bpo-40135: Fix multiprocessing test_shared_memory_across_processes() (GH-19892) X-Git-Tag: v3.8.3~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70fe95cdc9ac1b00d4f86b7525dca80caf7003e1;p=thirdparty%2FPython%2Fcpython.git bpo-40135: Fix multiprocessing test_shared_memory_across_processes() (GH-19892) Don't define shared memory block's name in test_shared_memory_across_processes(): use SharedMemory(create=True) instead. (cherry picked from commit caa3ef284a2e5e5b9bdd6a9e619804122c842d80) Co-authored-by: Hai Shi --- diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index 5943dd83cc14..ff58481f0031 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -3828,7 +3828,9 @@ class _TestSharedMemory(BaseTestCase): sms.close() def test_shared_memory_across_processes(self): - sms = shared_memory.SharedMemory('test02_tsmap', True, size=512) + # bpo-40135: don't define shared memory block's name in case of + # the failure when we run multiprocessing tests in parallel. + sms = shared_memory.SharedMemory(create=True, size=512) self.addCleanup(sms.unlink) # Verify remote attachment to existing block by name is working.