You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implementation of test_multiprocessing_forkserver.test_processes.WithProcessesTestLock.test_repr_rlock is racy; this leads to test failures on unrelated PRs:
Bug report
Bug description:
The implementation of
test_multiprocessing_forkserver.test_processes.WithProcessesTestLock.test_repr_rlock
is racy; this leads to test failures on unrelated PRs:The linked failures are a result of the raciness in the test:
cpython/Lib/test/_test_multiprocessing.py
Lines 1525 to 1530 in 30efede
and the function,
_acquire_release
, which runs in the thread:cpython/Lib/test/_test_multiprocessing.py
Lines 1489 to 1497 in 30efede
The tests will fail if
_acquire_release
runs to completion or doesn't acquire the lock before the test checks the repr.We should rewrite
test_repr_rlock
so that it does not usetime.sleep()
as a mechanism for ordering events between different processes/threads.CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered: