Skip Menu |

This queue is for tickets about the File-Path CPAN distribution.

Report information
The Basics
Id: 106299
Status: resolved
Priority: 0/
Queue: File-Path

People
Owner: Nobody in particular
Requestors: RICHE [...] cpan.org
Cc: craigberry [...] mac.com
AdminCc:

Bug Information
Severity: Important
Broken in: 2.11
Fixed in: (no value)



CC: craigberry [...] mac.com
Subject: Tests on VMS: catdir and directory permission issues
From Craig Berry There are two basic problems I can see right off, detailed output below. In verbose mode, mkdir reports what it’s working on in Unix format on VMS, whereas the test has constructed expectations from catdir, which always returns a path in native format. In safe mode, rmtree reports "skipped" when it can’t remove a directory without changing permissions. The difference on VMS is that the default protection for directories does not allow deletion without explicitly changing protection, but the test assumes that directories can always be deleted without doing so. ok 96 # skip Mode of 0 means assume user defaults on VMS not ok 97 - mkpath verbose (old style 1) # Failed test 'mkpath verbose (old style 1)' # at t/Path.t line 487. # got: 'mkdir test-55c51426-437-17bae/output # mkdir test-55c51426-437-17bae/output/A/ # ' # expected: 'mkdir [.test-55c51426-437-17bae.output] # mkdir [.test-55c51426-437-17bae.output.A] # ' not ok 98 - mkpath verbose (old style 2) # Failed test 'mkpath verbose (old style 2)' # at t/Path.t line 492. # got: 'mkdir test-55c51426-437-17bae/output/B/ # ' # expected: 'mkdir [.test-55c51426-437-17bae.output.B] # ' not ok 99 - rmtree verbose (old style) # Failed test 'rmtree verbose (old style)' # at t/Path.t line 497. # got: 'skipped [.test-55c51426-437-17bae.output.A] # skipped [.test-55c51426-437-17bae.output.B] # ' # expected: 'rmdir [.test-55c51426-437-17bae.output.A] # rmdir [.test-55c51426-437-17bae.output.B] # ' not ok 100 - mkpath verbose (new style 1) # Failed test 'mkpath verbose (new style 1)' # at t/Path.t line 502. # got: '' # expected: 'mkdir [.test-55c51426-437-17bae.output.A] # ' not ok 101 - mkpath verbose (new style 2) # Failed test 'mkpath verbose (new style 2)' # at t/Path.t line 507. # got: '' # expected: 'mkdir [.test-55c51426-437-17bae.output.B] # ' not ok 102 - again: rmtree verbose (old style) # Failed test 'again: rmtree verbose (old style)' # at t/Path.t line 512. # got: 'skipped [.test-55c51426-437-17bae.output.A] # skipped [.test-55c51426-437-17bae.output.B] # ' # expected: 'rmdir [.test-55c51426-437-17bae.output.A] # rmdir [.test-55c51426-437-17bae.output.B] # ' not ok 103 - make_path verbose with final hashref # Failed test 'make_path verbose with final hashref' # at t/Path.t line 517. # got: '' # expected: 'mkdir [.test-55c51426-437-17bae.output.A] # mkdir [.test-55c51426-437-17bae.output.B] # ' ok 104 - remove_tree verbose with final hashref
RT-Send-CC: craigberry [...] mac.com
I have made the following commit to hopefully solve this problem... but I can't test it since I don't have VMS so I will have to rely on you to test for me. https://github.com/rpcme/File-Path/commit/f1c1500567a4dbcee55922d73bb6d808ca4943f7
On Sat Aug 08 06:48:59 2015, RICHE wrote: Show quoted text
> I have made the following commit to hopefully solve this problem... > but I can't test it since I don't have VMS so I will have to rely on > you to test for me. > > https://github.com/rpcme/File- > Path/commit/f1c1500567a4dbcee55922d73bb6d808ca4943f7
Nevermind, I need to vmsify $base as well. Will let you know when that is done.
Okay, I think I got everything here. Please check it when you have a chance. I really appreciate it. https://github.com/rpcme/File-Path/commit/0065691af5b8e9c434ac623b7d1e0add5f3a1380
Subject: Re: [rt.cpan.org #106299] Tests on VMS: catdir and directory permission issues
Date: Sat, 08 Aug 2015 07:41:57 -0500
To: bug-File-Path [...] rt.cpan.org
From: "Craig A. Berry" <craigberry [...] mac.com>
Show quoted text
> On Aug 8, 2015, at 5:54 AM, Richard Elberger via RT <bug-File-Path@rt.cpan.org> wrote: > > <URL: https://rt.cpan.org/Ticket/Display.html?id=106299 > > > Okay, I think I got everything here. Please check it when you have a chance. I really appreciate it. > > https://github.com/rpcme/File-Path/commit/0065691af5b8e9c434ac623b7d1e0add5f3a1380
As I mentioned in the original ticket, catdir always returns paths in native format, so passing the result of it to vmsify just converts a native format path to native format, i.e., does nothing. There are two things that need to be abstracted out in constructing the expected values for the tests. 1.) The verbose report may show the path in a format different from the format that was passed in. 2.) If rmdir/rmtree in safe mode decides it cannot remove a directory without changing permissions, the verbose report will say “skipped” in place of the function name. The “can I delete this” check really needs to be the same in the test as in the module. I’ve been planning to work up a patch but am racing multiple deadlines and may not get to it for a bit. Show quoted text
________________________________________ Craig A. Berry mailto:craigberry@mac.com "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser
On Sat Aug 08 08:42:28 2015, craigberry@mac.com wrote: Show quoted text
>
> > On Aug 8, 2015, at 5:54 AM, Richard Elberger via RT <bug-File- > > Path@rt.cpan.org> wrote: > > > > <URL: https://rt.cpan.org/Ticket/Display.html?id=106299 > > > > > Okay, I think I got everything here. Please check it when you have a > > chance. I really appreciate it. > > > > https://github.com/rpcme/File- > > Path/commit/0065691af5b8e9c434ac623b7d1e0add5f3a1380
> > > As I mentioned in the original ticket, catdir always returns paths in > native format, so passing the result of it to vmsify just converts a > native format path to native format, i.e., does nothing. > > There are two things that need to be abstracted out in constructing > the expected values for the tests. > > 1.) The verbose report may show the path in a format different from > the format that was passed in. > > 2.) If rmdir/rmtree in safe mode decides it cannot remove a directory > without changing permissions, the verbose report will say “skipped” in > place of the function name. The “can I delete this” check really > needs to be the same in the test as in the module. > > I’ve been planning to work up a patch but am racing multiple deadlines > and may not get to it for a bit. > > ________________________________________ > Craig A. Berry > mailto:craigberry@mac.com > > "... getting out of a sonnet is much more > difficult than getting in." > Brad Leithauser
Ugh that's what I hate about not being able to test on an environment ... it would have caught that bonehead maneuver. Would VMS::Filespec::unixify do the right thing then?
Subject: Re: [rt.cpan.org #106299] Tests on VMS: catdir and directory permission issues
Date: Sat, 08 Aug 2015 23:17:11 -0500
To: bug-File-Path [...] rt.cpan.org
From: "Craig A. Berry" <craigberry [...] mac.com>
Show quoted text
> On Aug 8, 2015, at 7:55 AM, Richard Elberger via RT <bug-File-Path@rt.cpan.org> wrote:
Show quoted text
> Would VMS::Filespec::unixify do the right thing then?
Unfortunately it’s quite a bit more complicated than that (though that is part of the answer). I eventually sorted through it and have attached a patch. Please apply it with git am or something that will preserve the commit message. I have tested this on VMS and Mac OS X. I expect it to work on Windows but haven’t tried it. Show quoted text
________________________________________ Craig A. Berry mailto:craigberry@mac.com "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser

Message body is not shown because sender requested not to inline it.

On Sun Aug 09 00:17:37 2015, craigberry@mac.com wrote: Show quoted text
>
> > On Aug 8, 2015, at 7:55 AM, Richard Elberger via RT <bug-File- > > Path@rt.cpan.org> wrote:
> >
> > Would VMS::Filespec::unixify do the right thing then?
> > Unfortunately it’s quite a bit more complicated than that (though that > is part of the answer). I eventually sorted through it and have > attached a patch. Please apply it with git am or something that will > preserve the commit message. I have tested this on VMS and Mac OS X. > I expect it to work on Windows but haven’t tried it. > > ________________________________________ > Craig A. Berry > mailto:craigberry@mac.com > > "... getting out of a sonnet is much more > difficult than getting in." > Brad Leithauser
I needed to put the subs in the common file so we can leverage them for other tests if needed. https://github.com/rpcme/File-Path/commit/1ba67939923ca8dedb29a19ea018d94d0afcb9b1 please verify on VMS and if it's good I can resolve this issue. I really appreciate the help you've given on this --
Subject: Re: [rt.cpan.org #106299] Tests on VMS: catdir and directory permission issues
Date: Sun, 09 Aug 2015 13:38:48 -0500
To: bug-File-Path [...] rt.cpan.org
From: "Craig A. Berry" <craigberry [...] mac.com>
Show quoted text
> On Aug 9, 2015, at 10:53 AM, Richard Elberger via RT <bug-File-Path@rt.cpan.org> wrote: > > <URL: https://rt.cpan.org/Ticket/Display.html?id=106299 > > > On Sun Aug 09 00:17:37 2015, craigberry@mac.com wrote:
>>
>>> On Aug 8, 2015, at 7:55 AM, Richard Elberger via RT <bug-File- >>> Path@rt.cpan.org> wrote:
>> >>
>>> Would VMS::Filespec::unixify do the right thing then?
>> >> Unfortunately it’s quite a bit more complicated than that (though that >> is part of the answer). I eventually sorted through it and have >> attached a patch. Please apply it with git am or something that will >> preserve the commit message. I have tested this on VMS and Mac OS X. >> I expect it to work on Windows but haven’t tried it.
Show quoted text
> > I needed to put the subs in the common file so we can leverage them for other tests if needed. > > https://github.com/rpcme/File-Path/commit/1ba67939923ca8dedb29a19ea018d94d0afcb9b1 > > please verify on VMS and if it's good I can resolve this issue.
Yes, that works. You can close the ticket. Show quoted text
________________________________________ Craig A. Berry mailto:craigberry@mac.com "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser
On Sun Aug 09 14:38:59 2015, craigberry@mac.com wrote: Show quoted text
>
> > On Aug 9, 2015, at 10:53 AM, Richard Elberger via RT <bug-File- > > Path@rt.cpan.org> wrote: > > > > <URL: https://rt.cpan.org/Ticket/Display.html?id=106299 > > > > > On Sun Aug 09 00:17:37 2015, craigberry@mac.com wrote:
> >>
> >>> On Aug 8, 2015, at 7:55 AM, Richard Elberger via RT <bug-File- > >>> Path@rt.cpan.org> wrote:
> >> > >>
> >>> Would VMS::Filespec::unixify do the right thing then?
> >> > >> Unfortunately it’s quite a bit more complicated than that (though > >> that > >> is part of the answer). I eventually sorted through it and have > >> attached a patch. Please apply it with git am or something that > >> will > >> preserve the commit message. I have tested this on VMS and Mac OS > >> X. > >> I expect it to work on Windows but haven’t tried it.
>
> > > > I needed to put the subs in the common file so we can leverage them > > for other tests if needed. > > > > https://github.com/rpcme/File- > > Path/commit/1ba67939923ca8dedb29a19ea018d94d0afcb9b1 > > > > please verify on VMS and if it's good I can resolve this issue.
> > Yes, that works. You can close the ticket. > > ________________________________________ > Craig A. Berry > mailto:craigberry@mac.com > > "... getting out of a sonnet is much more > difficult than getting in." > Brad Leithauser
fixed on head