killing lutexes, adding timeouts
[sbcl.git] / tests / debug.impure.lisp
index ec0719b..c3c5a3b 100644 (file)
                                   (caar frame-specs)
                                   full-backtrace)
                           (setf result nil))
-
                         ;; check that we have all the frames we wanted
                         (mapcar
                          (lambda (spec frame)
                    (list '(flet not-optimized))
                    (list '(flet test) #'not-optimized))))))
 
-(with-test (:name :interrupted-syscall)
+(with-test (:name :backtrace-interrupted-condition-wait
+            :skipped-on '(not :sb-thread)
+                  ;; For some unfathomable reason the backtrace becomes
+                  ;; stunted on Darwin, ending at _sigtramp, when we add
+                  ;; :TIMEOUT NIL to the frame we expect. If we leave it out,
+                  ;; the backtrace is fine -- but the test fails. I can only
+                  ;; boggle right now.
+            :fails-on :darwin)
   (let ((m (sb-thread:make-mutex))
         (q (sb-thread:make-waitqueue)))
     (assert (verify-backtrace
                                           (error "foo"))))
                   (with-timeout 0.1
                     (sb-thread:condition-wait q m)))))
-            `((sb-thread:condition-wait ,q ,m))))))
+            `((sb-thread:condition-wait ,q ,m :timeout nil))))))
 
 ;;; Division by zero was a common error on PPC. It depended on the
 ;;; return function either being before INTEGER-/-INTEGER in memory,
     (load (compile-file "bug-414.lisp"))
     (disassemble 'bug-414)))
 
-(with-test (:name :bug-310175)
-  (let ((dx-arg (cons t t)))
+(with-test (:name :bug-310175 :fails-on '(not :stack-allocatable-lists))
+  ;; KLUDGE: Not all DX-enabled platforms DX CONS, and the compiler
+  ;; transforms two-arg-LIST* (and one-arg-LIST) to CONS.  Therefore,
+  ;; use two-arg-LIST, which should get through to VOP LIST, and thus
+  ;; stack-allocate on a predictable set of machines.
+  (let ((dx-arg (list t t)))
     (declare (dynamic-extent dx-arg))
     (flet ((dx-arg-backtrace (x)
              (declare (optimize (debug 2)))