Filesystem delete error in test-utilities on ACL windows

Bug #1469887 reported by Robert P. Goldman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ASDF
Fix Released
Undecided
Robert P. Goldman

Bug Description

Error message is as follows:

TEST ABORTED: UIOP/FILESYSTEM::DELETE-FILESYSTEM-TREE was asked to delete #P"F:\\asdf\\build\\deleteme\\" but it is not valid according to #<Interpreted Function (unnamed) @ #x207f9d0a>

I note a couple of oddities in the error report:

      ((not (call-function validate directory-pathname))
       (error "~S was asked to delete ~S but it is not valid ~@[according to ~S~]"
              'delete-filesystem-tree directory-pathname validate))

1. the function that fails is DELETE-DIRECTORY-TREE, but its error messages advertise failures in DELETE-FILESYSTEM-TREE. Isn't that a mistake?
2. the function passed as the value of VALIDATE seems to be an anonymous function, which makes the error message less than helpful.

The exact test that fails seems to be the folowing:

(delete-directory-tree (subpathname *build-directory* "deleteme/")
                       :validate (lambda (x) (and (<= 5 (length (pathname-directory x)))
                                                  (subpathp x *build-directory*))))

It looks like what's failing is the check on the length of the pathname directory. The length of the PATHNAME-DIRECTORY of (subpathname *build-directory* "deleteme/") is only 4 (on my system, "F:\\asdf\\build\\deleteme\\"). I'm not sure why this validation check would ever work. Why is there any guarantee that there will be at least four directory components in *build-directory*?

Revision history for this message
Faré (fahree) wrote :

Yes, the wrong function name is probably due to a renaming in an early pre-release of UIOP, to be fixed.

To accommodate your case, the 5 could probably be replaced by 4. This validation function is a belt and suspenders kind of safety to help you avoid deleting more (or something else) than you expect.

Changed in asdf:
assignee: nobody → Robert P. Goldman (rpgoldman)
milestone: none → asdf3.1.5
status: New → In Progress
Changed in asdf:
status: In Progress → Fix Committed
Changed in asdf:
status: Fix Committed → Fix Released
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.