bpo-38377: Add support.skip_if_broken_multiprocessing_synchronize()#20944
Conversation
On Linux, skip tests using multiprocessing if the current user cannot create a file in /dev/shm/ directory. Add the skip_if_broken_multiprocessing_synchronize() function to the test.support module.
|
Maybe my function is too strict, not all tests require to create a SemLock. But my intent is to avoid coupling tests like test_asyncio with low-level implementation details of multiprocessing. In practice, only the OpenSUSE build farm should be affected by this change. In general, /dev/shm/ is writable by anyone. Example on Fedora 32: |
|
@mcepl: Would it be possible for you to check if my change fix https://bugs.python.org/issue38377 for your use case? |
|
cc @pitrou |
|
On Python 3.8: Replacing |
Well, that's a bug in your backport.
I understand that this PR fix https://bugs.python.org/issue38377, good! |
Yes, it does. Pushing it now to the official openSUSE packages (OBS_dev-shm.patch) |
|
Obviously this one, it is a way more complete and less hassle to everybody. I’ll close my PR. |
Ok, I merged my PR and I'm backporting it to 3.8 and 3.9. |
|
…H-20944) (GH-20962) (GH-20966) On Linux, skip tests using multiprocessing if the current user cannot create a file in /dev/shm/ directory. Add the skip_if_broken_multiprocessing_synchronize() function to the test.support module. (cherry picked from commit ddbeb2f) (cherry picked from commit b1e7361)
|
On Linux, skip tests using multiprocessing if the current user cannot
create a file in /dev/shm/ directory. Add the
skip_if_broken_multiprocessing_synchronize() function to the
test.support module.
https://bugs.python.org/issue38377