Skip Menu |

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

Report information
The Basics
Id: 124751
Status: rejected
Priority: 0/
Queue: File-HomeDir

People
Owner: Nobody in particular
Requestors: 'spro^^*%*^6ut# [...] &$%*c
Cc:
AdminCc:

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



Subject: Test fail with stripped-down users
#65301 got closed when the additional, related failure I reported had not yet been fixed. It’s still broken as of File-HomeDir-1.002. My message from that ticket: On Mon Jan 30 01:13:43 2012, SPROUT wrote: Show quoted text
> On Mon Jan 31 17:09:50 2011, ADAMK wrote:
> > I believe this is now fixed in the latest dev release. > > > > Please re-open if you still have issues with 0.96_03
> > I’m afraid it’s not fixed. root is not the only user without special > directories. This logic can’t > be right, for several reasons. I have a stripped down user similar to > what you test for under > AUTOMATED_TESTING, but without having that env var set, because I’m > not automating > testing. So I always get test failures. Also, $< != 0 does not > indicate a normal user. www, > for instance, doesn’t have any special directories. So I would simply > suggest skipping this > test altogether. All it does is guarantee that File::HomeDir won’t > install in many places. > > } elsif ( > $^O eq 'darwin' > ) { > # "Unixes with proper desktops" special cases > if ( $ENV{AUTOMATED_TESTING} ) { > # Automated testers on Mac (notably BINGOS) will often > have > # super stripped down testing users. > $HAVEHOME = 1; > $HAVEDESKTOP = 1; > $HAVEMUSIC = 0; > $HAVEPICTURES = 0; > $HAVEVIDEOS = 0; > $HAVEOTHERS = 1; > } elsif ( $< ) { > # Normal user > $HAVEHOME = 1; > $HAVEDESKTOP = 1; > $HAVEMUSIC = 1; > $HAVEPICTURES = 1; > $HAVEVIDEOS = 1; > $HAVEOTHERS = 1; > } else { > # Root can only be relied on to have a home > $HAVEHOME = 1; > $HAVEDESKTOP = 0; > $HAVEMUSIC = 0; > $HAVEPICTURES = 0; > $HAVEVIDEOS = 0; > $HAVEOTHERS = 0; > }
The failures I’m getting look like this: # Failed test 'Our videos directory exists' # at t/02_main.t line 244. # Failed test 'Our videos directory exists' # at t/02_main.t line 245. # Looks like you failed 2 tests of 39. t/02_main.t ........... Dubious, test returned 2 (wstat 512, 0x200) I suggest simply skipping the test. It assumes too much. (BTW, it’s this six-year-old-and-older bug that led me to write File::HomeDir::Tiny.)
I forgot to set it to patched - but the according patch has been applied and it's on github. Release is coming. If you have questions to a particular ticket, please add your responses to that particular ticket.