+(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
+ (lambda ()
+ (sb-thread:with-mutex (m)
+ (handler-bind ((timeout (lambda (c)
+ (error "foo"))))
+ (with-timeout 0.1
+ (sb-thread:condition-wait q m)))))
+ `((sb-thread:condition-wait ,q ,m :timeout nil))))))
+