[Python-checkins] cpython (3.2): Issue #11223: skip also test_rlock_acquire_interruption() on FreeBSD6
victor.stinner
python-checkins at python.org
Thu Jun 23 14:22:49 CEST 2011
http://hg.python.org/cpython/rev/e5183f16c49d
changeset: 70935:e5183f16c49d
branch: 3.2
parent: 70933:07655b3dee4f
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Thu Jun 23 14:22:28 2011 +0200
summary:
Issue #11223: skip also test_rlock_acquire_interruption() on FreeBSD6
files:
Lib/test/test_threadsignals.py | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/Lib/test/test_threadsignals.py b/Lib/test/test_threadsignals.py
--- a/Lib/test/test_threadsignals.py
+++ b/Lib/test/test_threadsignals.py
@@ -14,6 +14,10 @@
process_pid = os.getpid()
signalled_all=thread.allocate_lock()
+# Issue #11223: Locks are implemented using a mutex and a condition variable of
+# the pthread library on FreeBSD6. POSIX condition variables cannot be
+# interrupted by signals (see pthread_cond_wait manual page).
+USING_PTHREAD_COND = (sys.platform == 'freebsd6')
def registerSignals(for_usr1, for_usr2, for_alrm):
usr1 = signal.signal(signal.SIGUSR1, for_usr1)
@@ -70,10 +74,7 @@
def alarm_interrupt(self, sig, frame):
raise KeyboardInterrupt
- # Issue #11223: Locks are implemented using a mutex and a condition
- # variable of the pthread library on FreeBSD6. POSIX condition variables
- # cannot be interrupted by signals (see pthread_cond_wait manual page).
- @unittest.skipIf(sys.platform == 'freebsd6',
+ @unittest.skipIf(USING_PTHREAD_COND,
'POSIX condition variables cannot be interrupted')
def test_lock_acquire_interruption(self):
# Mimic receiving a SIGINT (KeyboardInterrupt) with SIGALRM while stuck
@@ -96,6 +97,8 @@
finally:
signal.signal(signal.SIGALRM, oldalrm)
+ @unittest.skipIf(USING_PTHREAD_COND,
+ 'POSIX condition variables cannot be interrupted')
def test_rlock_acquire_interruption(self):
# Mimic receiving a SIGINT (KeyboardInterrupt) with SIGALRM while stuck
# in a deadlock.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list