Fix lose() invocation inside sparc-arch.c
[sbcl.git] / tests / clos-cache.impure.lisp
index e7a2971..46e1a1a 100644 (file)
         (write-line string)))))
 
 (defun test-loop ()
-  (note "/~S waiting for permission to run" sb-thread:*current-thread*)  
-  (loop until *run-cache-test*)
-  (note "/~S joining the tundering herd" sb-thread:*current-thread*)
+  (note "/~S waiting for permission to run" sb-thread:*current-thread*)
+  (loop until *run-cache-test* do (sb-thread:thread-yield))
+  (note "/~S joining the thundering herd" sb-thread:*current-thread*)
   (handler-case
       (loop repeat 1024 do (test-cache))
     (error (e)
       (note "~&Error in cache test in ~S:~%~A~%...aborting"
             sb-thread:*current-thread* e)
-      (sb-ext:quit :unix-status 1)))
+      (sb-ext:exit :code 1)))
   (note "/~S done" sb-thread:*current-thread*))
 
 #+sb-thread
   (mapcar #'sb-thread:join-thread threads))
 
 #-sb-thread
-(loop repeat 4
-      do (test-loop))
+(progn
+  (setf *run-cache-test* t)
+  (loop repeat 4
+        do (test-loop)))
 
 ;;; Check that the test tests what it was supposed to test: the cache.
 (assert (sb-pcl::cache-p (sb-pcl::gf-dfun-cache #'cache-test)))