X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fpackages.impure.lisp;h=82ef917ef5e1fcf3378fe0201f71398b0631136e;hb=b14aefb22fd710673b1a1005add3c0425713d2a0;hp=96431a5dd8a992ca380deb83adfa1463fb449a37;hpb=4c81c652cdc32faefee1bccb84c3c9a7854e3edd;p=sbcl.git diff --git a/tests/packages.impure.lisp b/tests/packages.impure.lisp index 96431a5..82ef917 100644 --- a/tests/packages.impure.lisp +++ b/tests/packages.impure.lisp @@ -292,11 +292,15 @@ if a restart was invoked." ;;; MAKE-PACKAGE error in another thread blocking FIND-PACKAGE & FIND-SYMBOL (with-test (:name :bug-511072 :skipped-on '(not :sb-thread)) (let* ((p (make-package :bug-511072)) - (sem (sb-thread:make-semaphore)) + (sem1 (sb-thread:make-semaphore)) + (sem2 (sb-thread:make-semaphore)) (t2 (sb-thread:make-thread (lambda () (handler-bind ((error (lambda (c) - (sb-thread:signal-semaphore sem) - (signal c)))) + (sb-thread:signal-semaphore sem1) + (sb-thread:wait-on-semaphore sem2) + (abort c)))) (make-package :bug-511072)))))) - (sb-thread:wait-on-semaphore sem) - (assert (eq 'cons (read-from-string "CL:CONS"))))) + (sb-thread:wait-on-semaphore sem1) + (with-timeout 10 + (assert (eq 'cons (read-from-string "CL:CONS")))) + (sb-thread:signal-semaphore sem2)))