diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-09-12 21:11:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 21:11:45 (GMT) |
commit | 5a435eac1b83f080c9dfceff0de0d639541e4bcb (patch) | |
tree | 5dae0d08af3f18a30dd95b67bb99af1e99281877 /Lib | |
parent | aa12534acff4868f6dce9e2364a66fbb0ebcb3ca (diff) | |
download | cpython-5a435eac1b83f080c9dfceff0de0d639541e4bcb.zip cpython-5a435eac1b83f080c9dfceff0de0d639541e4bcb.tar.gz cpython-5a435eac1b83f080c9dfceff0de0d639541e4bcb.tar.bz2 |
closes bpo-34004: Skip lock interruption tests on musl. (GH-9224)
Returning EINTR from pthread semaphore or lock acquisition is an optional POSIX
feature. musl does not provide this feature, so some threadsignal tests fail
when Python is built against it.
There's no good way to test for musl, so we skip if we're on Linux and not using
glibc pthreads.
Also, hedge in the threading documentation about when we can provide interrupts
from lock acquisition.
(cherry picked from commit 5b10d5111d7a855297654af9045f8907b7d3dd08)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_threadsignals.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_threadsignals.py b/Lib/test/test_threadsignals.py index 99b60cd..9083e41 100644 --- a/Lib/test/test_threadsignals.py +++ b/Lib/test/test_threadsignals.py @@ -78,6 +78,10 @@ class ThreadSignals(unittest.TestCase): @unittest.skipIf(USING_PTHREAD_COND, 'POSIX condition variables cannot be interrupted') + @unittest.skipIf(sys.platform.startswith('linux') and + not sys.thread_info.version, + 'Issue 34004: musl does not allow interruption of locks ' + 'by signals.') # Issue #20564: sem_timedwait() cannot be interrupted on OpenBSD @unittest.skipIf(sys.platform.startswith('openbsd'), 'lock cannot be interrupted on OpenBSD') @@ -105,6 +109,10 @@ class ThreadSignals(unittest.TestCase): @unittest.skipIf(USING_PTHREAD_COND, 'POSIX condition variables cannot be interrupted') + @unittest.skipIf(sys.platform.startswith('linux') and + not sys.thread_info.version, + 'Issue 34004: musl does not allow interruption of locks ' + 'by signals.') # Issue #20564: sem_timedwait() cannot be interrupted on OpenBSD @unittest.skipIf(sys.platform.startswith('openbsd'), 'lock cannot be interrupted on OpenBSD') |