Skip to content

Commit caa3ef2

Browse files
authored
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.
1 parent b88cd58 commit caa3ef2

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
@@ -3860,7 +3860,9 @@ class OptionalAttachSharedMemory(shared_memory.SharedMemory):
38603860
sms.close()
38613861

38623862
def test_shared_memory_across_processes(self):
3863-
sms = shared_memory.SharedMemory('test02_tsmap', True, size=512)
3863+
# bpo-40135: don't define shared memory block's name in case of
3864+
# the failure when we run multiprocessing tests in parallel.
3865+
sms = shared_memory.SharedMemory(create=True, size=512)
38643866
self.addCleanup(sms.unlink)
38653867

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

0 commit comments

Comments
 (0)