X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fdebug.impure.lisp;h=042763e3f26d1158afdd510154b1d6a7ebe60ead;hb=9aac8cfe0d3b3dd27b292e5661104221ddbd1bee;hp=7be8b14a5f91b404813921a1fba43c2c9419a372;hpb=ef43bf713ac67d3acf4727a5111567e70675df44;p=sbcl.git diff --git a/tests/debug.impure.lisp b/tests/debug.impure.lisp index 7be8b14..042763e 100644 --- a/tests/debug.impure.lisp +++ b/tests/debug.impure.lisp @@ -151,7 +151,7 @@ (with-test (:name (:undefined-function :bug-346) :fails-on '(or :alpha :ppc :sparc :mips - (and :x86-64 (or :freebsd :darwin)))) + (and :x86-64 :freebsd))) (assert (verify-backtrace (lambda () (test #'optimized)) (list *undefined-function-frame* @@ -165,7 +165,7 @@ ;; the presence of the IR1 stepper instrumentation (and ;; is thus again failing now that the instrumentation is ;; no more). - :fails-on '(or :x86 :x86-64 :alpha :mips)) + :fails-on '(or :alpha :mips :ppc)) (assert (verify-backtrace (lambda () (test #'not-optimized)) (list *undefined-function-frame* @@ -194,12 +194,12 @@ (declare (optimize (speed 1) (debug 2))) ; no tail call elimination (funcall fun))) (with-test (:name (:divide-by-zero :bug-346) - :fails-on '(or :alpha (and :x86-64 :darwin))) ; bug 346 + :fails-on :alpha) ; bug 346 (assert (verify-backtrace (lambda () (test #'optimized)) (list '(/ 42 &rest) (list '(flet test) #'optimized))))) (with-test (:name (:divide-by-zero :bug-356) - :fails-on '(or :alpha (and :x86-64 :darwin))) ; bug 356 + :fails-on :alpha) ; bug 356 (assert (verify-backtrace (lambda () (test #'not-optimized)) (list '(/ 42 &rest) '((flet not-optimized)) @@ -207,8 +207,6 @@ (with-test (:name (:throw :no-such-tag) :fails-on '(or - (and :x86 :sunos) - (and :x86-64 :darwin) (and :sparc :linux) :alpha :mips)) @@ -256,9 +254,19 @@ `(let ((sb-debug:*show-entry-point-details* ,bool)) ,@body)) +(defun bug-354 (x) + (error "XEPs in backtraces: ~S" x)) + +(with-test (:name :bug-354) + (with-details t + (assert (not (verify-backtrace (lambda () (bug-354 354)) + '((bug-354 &rest) + ((sb-c::tl-xep bug-354) &rest)))))) + (assert (verify-backtrace (lambda () (bug-354 354)) '((bug-354 354))))) + ;;; FIXME: This test really should be broken into smaller pieces (with-test (:name (:backtrace :misc) - :fails-on '(or (and :x86 (or :sunos)) (and :x86-64 :darwin))) + :fails-on '(and :x86 (or :sunos))) (write-line "//tl-xep") (with-details t (assert (verify-backtrace #'namestring @@ -358,6 +366,53 @@ '(((lambda (x)) 13) ((lambda (y)) 13)))) +(with-test (:name :clos-slot-typecheckfun-named) + (assert + (verify-backtrace + (lambda () + (eval `(locally (declare (optimize safety)) + (defclass clos-typecheck-test () + ((slot :type fixnum))) + (setf (slot-value (make-instance 'clos-typecheck-test) 'slot) t)))) + '(((sb-pcl::slot-typecheck clos-typecheck-test slot) t))))) + +(with-test (:name :clos-emf-named) + (assert + (verify-backtrace + (lambda () + (eval `(progn + (defmethod clos-emf-named-test ((x symbol)) x) + (defmethod clos-emf-named-test :before (x) (assert x)) + (clos-emf-named-test nil)))) + '(((sb-pcl::emf clos-emf-named-test) ? ? nil))))) + +(with-test (:name :bug-310173) + (flet ((make-fun (n) + (let* ((names '(a b)) + (req (loop repeat n collect (pop names)))) + (compile nil + `(lambda (,@req &rest rest) + (let ((* *)) ; no tail-call + (apply '/ ,@req rest))))))) + (assert + (verify-backtrace (lambda () + (funcall (make-fun 0) 10 11 0)) + '((sb-kernel:two-arg-/ 10/11 0) + (/ 10 11 0) + ((lambda (&rest rest)) 10 11 0)))) + (assert + (verify-backtrace (lambda () + (funcall (make-fun 1) 10 11 0)) + '((sb-kernel:two-arg-/ 10/11 0) + (/ 10 11 0) + ((lambda (a &rest rest)) 10 11 0)))) + (assert + (verify-backtrace (lambda () + (funcall (make-fun 2) 10 11 0)) + '((sb-kernel:two-arg-/ 10/11 0) + (/ 10 11 0) + ((lambda (a b &rest rest)) 10 11 0)))))) + ;;;; test TRACE (defun trace-this () @@ -381,7 +436,7 @@ ;;; on that platform. #-(and (or ppc x86 x86-64) darwin) (with-test (:name (trace :encapsulate nil) - :fails-on '(or :ppc :sparc :mips)) + :fails-on '(or (and :ppc (not :linux)) :sparc :mips)) (let ((out (with-output-to-string (*trace-output*) (trace trace-this :encapsulate nil) (assert (eq 'ok (trace-this))) @@ -391,7 +446,7 @@ #-(and (or ppc x86 x86-64) darwin) (with-test (:name (trace-recursive :encapsulate nil) - :fails-on '(or :ppc :sparc :mips)) + :fails-on '(or (and :ppc (not :linux)) :sparc :mips)) (let ((out (with-output-to-string (*trace-output*) (trace trace-fact :encapsulate nil) (assert (= 120 (trace-fact 5))) @@ -400,6 +455,20 @@ (assert (search "returned 1" out)) (assert (search "returned 120" out)))) +(defun trace-and-fmakunbound-this (x) + x) + +(with-test (:name :bug-667657) + (trace trace-and-fmakunbound-this) + (fmakunbound 'trace-and-fmakunbound-this) + (untrace) + (assert (not (trace)))) + +(with-test (:name :bug-414) + (handler-bind ((warning #'error)) + (load (compile-file "bug-414.lisp")) + (disassemble 'bug-414))) + ;;;; test infinite error protection (defmacro nest-errors (n-levels error-form)