X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fthreads.pure.lisp;h=b10820a594d2e8be5903d992afaab7c9b010fa19;hb=ed891a4fd882d1b9fe066ab14bcf2107aea95baa;hp=6b58125ea26512455c3fc19fd8fac2a297688af2;hpb=4bcaeb66d7095e4668bf076e8f4d7e3b6363e2f8;p=sbcl.git diff --git a/tests/threads.pure.lisp b/tests/threads.pure.lisp index 6b58125..b10820a 100644 --- a/tests/threads.pure.lisp +++ b/tests/threads.pure.lisp @@ -54,14 +54,13 @@ ;;; GET-MUTEX should not be interruptible under WITHOUT-INTERRUPTS #+sb-thread -(with-test (:name without-interrupts+get-mutex - :fails-on :sb-lutex) +(with-test (:name without-interrupts+get-mutex) (let* ((lock (make-mutex)) - (foo (get-mutex lock)) + (bar (progn (get-mutex lock) nil)) (thread (make-thread (lambda () (sb-sys:without-interrupts - (with-mutex (lock) - :fini)))))) + (with-mutex (lock) + (setf bar t))))))) (sleep 1) (assert (thread-alive-p thread)) (terminate-thread thread) @@ -70,4 +69,18 @@ (release-mutex lock) (sleep 1) (assert (not (thread-alive-p thread))) - (assert (eq :fini (join-thread thread))))) + (assert (eq :aborted (join-thread thread :default :aborted))) + (assert bar))) + +#+sb-thread +(with-test (:name parallel-find-class) + (let* ((oops nil) + (threads (loop repeat 10 + collect (make-thread (lambda () + (handler-case + (loop repeat 10000 + do (find-class (gensym) nil)) + (serious-condition () + (setf oops t)))))))) + (mapcar #'sb-thread:join-thread threads) + (assert (not oops))))