Test bug/walk.2 fails on every implementation

Bug #1009817 reported by Patrick Stein
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ITERATE macro
New
Undecided
Unassigned
common-lisp
New
Undecided
Unassigned

Bug Description

Looking through the cl-test-grid results, on every implementation where the tests compiled and ran, the bug/walk.2 test failed.

Example of failure output (this from ECL 12.2.1):

    Test ITERATE.TEST::BUG/WALK.2 failed
    Form: (ITERATE:ITER (RETURN (IF (ODDP 1) (PROGN) 'ITERATE.TEST::EVEN)))
    Expected value: NIL
    Actual value: ITERATE.TEST::EVEN.

As a group at the TC Lispers meeting, we looked at this one. We believe it is the "just for looks" NIL as the consequent in the IF form here:

    (defun walk-progn (progn &rest stuff)
      ;; The only difference between this and walk-cdr is that *top-level* is not
      ;; bound. This is so macros can return PROGNs of things. It's exactly like
      ;; the definition of "top-level" in lisp.
      ;; (Also, just for looks, this returns nil if the progn is empty.)
      (return-code-modifying-body #'walk-list stuff
                                  #L(if (null !1)
                                        nil
                                        (list (cons progn !1)))))

Return instead a list containing (cons progn nil) got us to pass the test on the implementation we tried. We didn't look to hard to make sure that didn't break anything else, but it feels safe.

Tags: iterate
tags: added: iterate
Revision history for this message
Patrick Stein (nklein) wrote :

This was also reported to iterate-devel list Anton Vodonosov avodonosov at yandex.ru
Wed Dec 28 14:02:10 PST 2011

http://lists.common-lisp.net/pipermail/iterate-devel/2011-December/000686.html

============================================
Hello.

I am running iterate tests (between other often-used CL libraries) on different Lisps.
The results of continuous testing may be found here:
http://common-lisp.net/project/cl-test-grid/pivot_ql-lib_lisp.html.

Currently Iterate has the same failure on all the lisps:

   Test ITERATE.TEST::BUG/WALK.2 failed
   Form: (ITERATE:ITER
           (RETURN
            (IF (ODDP 1)
                (PROGN)
                'ITERATE.TEST::EVEN)))
   Expected value: NIL
   Actual value: ITERATE.TEST::EVEN.

Best regards,
- Anton
============================================

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.