X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fdebug.impure.lisp;h=c3c5a3b66667dee956da10d113b0eae45d3dd6d8;hb=d6f9676ae94419cb5544c45821a8d31adbc1fbe8;hp=6ffa8d34c71c03d3e9f1169a8231104de8908091;hpb=88d80e04126a9842338cd6f8bbc5e6627eaff187;p=sbcl.git diff --git a/tests/debug.impure.lisp b/tests/debug.impure.lisp index 6ffa8d3..c3c5a3b 100644 --- a/tests/debug.impure.lisp +++ b/tests/debug.impure.lisp @@ -106,7 +106,6 @@ (caar frame-specs) full-backtrace) (setf result nil)) - ;; check that we have all the frames we wanted (mapcar (lambda (spec frame) @@ -173,6 +172,25 @@ (list '(flet not-optimized)) (list '(flet test) #'not-optimized)))))) +(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)))))) + ;;; Division by zero was a common error on PPC. It depended on the ;;; return function either being before INTEGER-/-INTEGER in memory, ;;; or more than MOST-POSITIVE-FIXNUM bytes ahead. It also depends on @@ -360,8 +378,8 @@ (defvar *compile-nil-non-tc* (compile nil '(lambda (y) (cons (funcall *compile-nil-error* y) nil)))) (with-test (:name (:compile nil)) (assert (verify-backtrace (lambda () (funcall *compile-nil-non-tc* 13)) - '(((lambda (x)) 13) - ((lambda (y)) 13))))) + '(((lambda (x)) 13) + ((lambda (y)) 13))))) (with-test (:name :clos-slot-typecheckfun-named) (assert @@ -422,9 +440,9 @@ (with-test (:name (trace :simple)) (let ((out (with-output-to-string (*trace-output*) - (trace trace-this) - (assert (eq 'ok (trace-this))) - (untrace)))) + (trace trace-this) + (assert (eq 'ok (trace-this))) + (untrace)))) (assert (search "TRACE-THIS" out)) (assert (search "returned OK" out)))) @@ -467,8 +485,12 @@ (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))) @@ -534,7 +556,7 @@ (test-inifinite-error-protection)) (with-test (:name (infinite-error-protection :thread) - :skipped-on '(not :sb-thread)) + :skipped-on '(not :sb-thread)) (enable-debugger) (let ((thread (sb-thread:make-thread #'test-inifinite-error-protection))) (loop while (sb-thread:thread-alive-p thread))))