enable previously-broken thread tests on Darwin
authorNikodemus Siivola <nikodemus@random-state.net>
Sun, 4 Dec 2011 17:19:33 +0000 (19:19 +0200)
committerNikodemus Siivola <nikodemus@random-state.net>
Mon, 5 Dec 2011 16:38:39 +0000 (18:38 +0200)
  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
tests/threads.impure.lisp
tests/threads.pure.lisp
tests/timer.impure.lisp

index e6cee14..88d3975 100644 (file)
       (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.
index 141cec0..71eb25e 100644 (file)
 
 (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
 
 (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
 
 (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
index e58cda7..5d72bd9 100644 (file)
 
 ;;; 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)
index a610eb9..e4bd2d5 100644 (file)
 ;;; 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 ()