Skip to content

Commit 70fe95c

Browse files
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 caa3ef2) Co-authored-by: Hai Shi <[email protected]>
1 parent 9609460 commit 70fe95c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/_test_multiprocessing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3828,7 +3828,9 @@ class OptionalAttachSharedMemory(shared_memory.SharedMemory):
38283828
sms.close()
38293829

38303830
def test_shared_memory_across_processes(self):
3831-
sms = shared_memory.SharedMemory('test02_tsmap', True, size=512)
3831+
# bpo-40135: don't define shared memory block's name in case of
3832+
# the failure when we run multiprocessing tests in parallel.
3833+
sms = shared_memory.SharedMemory(create=True, size=512)
38323834
self.addCleanup(sms.unlink)
38333835

38343836
# Verify remote attachment to existing block by name is working.

0 commit comments

Comments
 (0)