Reduce the numbers of threads in test ATOMIC-UPDATE on 32bit platforms
[sbcl.git] / tests / signals.impure.lisp
index 7be8bac..ea6e895 100644 (file)
@@ -13,7 +13,7 @@
 
 (use-package :test-util)
 
-(with-test (:name (:async-unwind :specials))
+(with-test (:name (:async-unwind :specials) :fails-on :win32)
   (let ((*x0* nil) (*x1* nil) (*x2* nil) (*x3* nil) (*x4* nil))
     (declare (special *x0* *x1* *x2* *x3* *x4*))
     (loop repeat 10 do
@@ -38,7 +38,7 @@
 
 (require :sb-posix)
 
-(with-test (:name (:signal :errno))
+(with-test (:name (:signal :errno) :fails-on :win32)
   (let* (saved-errno
          (returning nil)
          (timer (make-timer (lambda ()
@@ -57,7 +57,7 @@
     (loop repeat 1000000000)
     (assert (= saved-errno (sb-unix::get-errno)))))
 
-(with-test (:name :handle-interactive-interrupt)
+(with-test (:name :handle-interactive-interrupt :fails-on :win32)
   (assert (eq :condition
               (handler-case
                   (sb-thread::kill-safely
                    sb-unix:sigint)
                 (sb-sys:interactive-interrupt ()
                   :condition)))))
+
+(with-test (:name :bug-640516)
+  ;; On Darwin interrupting a SLEEP so that it took longer than
+  ;; the requested amount caused it to hang.
+  (assert
+   (handler-case
+       (sb-ext:with-timeout 10
+         (let (to)
+           (handler-bind ((sb-ext:timeout (lambda (c)
+                                            (unless to
+                                              (setf to t)
+                                              (sleep 2)
+                                              (continue c)))))
+             (sb-ext:with-timeout 0.1 (sleep 1) t))))
+     (sb-ext:timeout ()
+       nil))))