From de19b78acd2ecb0f6caedaaedee35031f0c61c1c Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Sun, 4 Dec 2011 19:19:33 +0200 Subject: [PATCH] enable previously-broken thread tests on Darwin WIN!? I have not been able to make threaded SBCL on Darwin croak yet with the semaphore implementation in the previous commit, so ... maybe. I suspect the sb-concurrency tests can now be enabled on SunOS as well, but since I don't have a box to test that hypothesis on, leaving them disabled for now. --- contrib/sb-concurrency/tests/test-mailbox.lisp | 8 ++++---- tests/threads.impure.lisp | 9 +++------ tests/threads.pure.lisp | 6 ++---- tests/timer.impure.lisp | 4 +++- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/contrib/sb-concurrency/tests/test-mailbox.lisp b/contrib/sb-concurrency/tests/test-mailbox.lisp index e6cee14..88d3975 100644 --- a/contrib/sb-concurrency/tests/test-mailbox.lisp +++ b/contrib/sb-concurrency/tests/test-mailbox.lisp @@ -57,12 +57,12 @@ (apply #'+ (mapcar #'join-thread readers))) 1000) -;;; FIXME: Several tests disabled on Darwin and SunOS due to hangs. +;;; FIXME: Several tests disabled on SunOS due to hangs. ;;; -;;; On Darwin at least the issues don't seem to have anything to do with -;;; mailboxes per-se, but are rather related to our usage of signal-unsafe +;;; The issues don't seem to have anything to do with mailboxes +;;; per-se, but are rather related to our usage of signal-unsafe ;;; pthread functions inside signal handlers. -#+(and sb-thread (not (or darwin sunos))) +#+(and sb-thread (not sunos)) (progn ;; Dummy struct for ATOMIC-INCF to work. diff --git a/tests/threads.impure.lisp b/tests/threads.impure.lisp index 141cec0..71eb25e 100644 --- a/tests/threads.impure.lisp +++ b/tests/threads.impure.lisp @@ -528,8 +528,7 @@ (defun alloc-stuff () (copy-list '(1 2 3 4 5))) -(with-test (:name (:interrupt-thread :interrupt-consing-child) - :broken-on :darwin) +(with-test (:name (:interrupt-thread :interrupt-consing-child)) (let ((thread (sb-thread:make-thread (lambda () (loop (alloc-stuff)))))) (let ((killers (loop repeat 4 collect @@ -1173,7 +1172,7 @@ (format t "infodb test done~%") -(with-test (:name :backtrace :broken-on :darwin) +(with-test (:name :backtrace) ;; Printing backtraces from several threads at once used to hang the ;; whole SBCL process (discovered by accident due to a timer.impure ;; test misbehaving). The cause was that packages weren't even @@ -1192,9 +1191,7 @@ (format t "~&starting gc deadlock test: WARNING: THIS TEST WILL HANG ON FAILURE!~%") -(with-test (:name :gc-deadlock - ;; Prone to hang on Darwin due to interrupt issues. - :broken-on :darwin) +(with-test (:name :gc-deadlock) ;; Prior to 0.9.16.46 thread exit potentially deadlocked the ;; GC due to *all-threads-lock* and session lock. On earlier ;; versions and at least on one specific box this test is good enough diff --git a/tests/threads.pure.lisp b/tests/threads.pure.lisp index e58cda7..5d72bd9 100644 --- a/tests/threads.pure.lisp +++ b/tests/threads.pure.lisp @@ -179,11 +179,9 @@ ;;; Disabled on Darwin due to deadlocks caused by apparent OS specific deadlocks, ;;; wich _appear_ to be caused by malloc() and free() not being thread safe: an -;;; interrupted malloc in one thread can apparently block a free in another. There -;;; are also some indications that pthread_mutex_lock is not re-entrant. +;;; interrupted malloc in one thread can apparently block a free in another. (with-test (:name symbol-value-in-thread.3 - :skipped-on '(not :sb-thread) - :broken-on :darwin) + :skipped-on '(not :sb-thread)) (let* ((parent *current-thread*) (semaphore (make-semaphore)) (running t) diff --git a/tests/timer.impure.lisp b/tests/timer.impure.lisp index a610eb9..e4bd2d5 100644 --- a/tests/timer.impure.lisp +++ b/tests/timer.impure.lisp @@ -245,7 +245,9 @@ ;;; Used to hang occasionally at least on x86. Two bugs caused it: ;;; running out of stack (due to repeating timers being rescheduled ;;; before they ran) and dying threads were open interrupts. -(with-test (:name (:timer :parallel-unschedule) :fails-on :ppc :skipped-on '(not :sb-thread) :broken-on '(or :darwin :ppc)) +(with-test (:name (:timer :parallel-unschedule) + :skipped-on '(not :sb-thread) + :broken-on ':ppc) (let ((timer (sb-ext:make-timer (lambda () 42) :name "parallel schedulers")) (other nil)) (flet ((flop () -- 1.7.10.4