New submission from Jakub Kulik <kulik...@gmail.com>:

Hi,

with the addition of shared memory into Python 3.8, we now have three tests 
failing on Solaris, namely `test_multiprocessing_fork`, 
`test_multiprocessing_forkserver` and `test_multiprocessing_spawn`. All of them 
fail in the same way:

======================================================================
ERROR: test_shared_memory_cleaned_after_process_termination 
(test.test_multiprocessing_fork.WithProcessesTestSharedMemory)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../Python-3.8.0b2/Lib/test/_test_multiprocessing.py", line 4013, in 
test_shared_memory_cleaned_after_process_termination
    smm = shared_memory.SharedMemory(name, create=False)
  File ".../Python-3.8.0b2/Lib/multiprocessing/shared_memory.py", line 100, in 
__init__
    self._fd = _posixshmem.shm_open(
OSError: [Errno 22] Invalid argument: '//psm_5c1b5800'

The reason for this, in my opinion, is that the test suite is accessing private 
`sm._name` instead of the normalized `sm.name`. Returned value already has one 
slash prepended, and another one is prepended SharedMemory init is called, 
resulting in double slashes, which is incorrect.

Change to `sm.name` fixes this problem.

----------
components: Tests
messages: 347662
nosy: kulikjak
priority: normal
severity: normal
status: open
title: Shared memory tests are failing due to double slashes
type: behavior
versions: Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37558>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to