develooper Front page | perl.perl5.porters | Postings from May 2013

[perl #116851] Test failures on DragonflyBSD

Thread Previous
From:
James E Keenan via RT
Date:
May 20, 2013 02:37
Subject:
[perl #116851] Test failures on DragonflyBSD
Message ID:
rt-3.6.HEAD-2650-1369017452-471.116851-15-0@perl.org
On Sun Feb 24 11:07:42 2013, chris@bingosnet.co.uk wrote:
> On Sat, Feb 23, 2013 at 11:57:04PM +0000, Dave Mitchell wrote:
> > On Tue, Feb 19, 2013 at 03:19:22AM -0800, Kidney Bingos wrote:
> > > The following tests fail on DragonflyBSD:
> > [snip]
> > > $ ./perl harness -v ../lib/File/Copy.t
> > > Inappropriate file type or format: file-31740 => 2777 at
> ../lib/File/Copy.t line 339.
> >
> > This means that perl is trying to do a chmod 2777 and is getting an
> OS
> > error. Perhaps this version of BSD doesn't support the GID bit?
> >
> > What error (if any) do the following give you:
> >
> > $ touch foo
> > $ chmod 2777 foo
> > $ perl -le 'for (0..7) { chmod((($_ << 9)|0777), "foo") or print
> "failed $_: $!" }'
> >
> >
> 
> $ touch foo
> $ chmod 2777 foo
> $ ls -l
> total 1
> -rwxrwsrwx  1 bingos  bingos    0 Feb 24 18:27 foo
> drwxr-xr-x  3 bingos  bingos  512 Feb 19 11:01 repos
> $ /opt/perl-5.16.2/bin/perl -le 'for (0..7) { chmod((($_ << 9)|0777),
> "foo") or print "failed $_: $!" }'
> failed 2: Inappropriate file type or format
> failed 3: Inappropriate file type or format
> failed 4: Inappropriate file type or format
> failed 5: Inappropriate file type or format
> failed 6: Inappropriate file type or format
> failed 7: Inappropriate file type or format
> $
> 
> SetGID is supported. What seems to occur above is that once the sticky
> bit is set
> (sticky bit being restricted to directories on UFS-based FS) one can't
> change it,
>  [
>   http://leaf.dragonflybsd.org/cgi/web-man?command=chmod&section=1
>   http://leaf.dragonflybsd.org/cgi/web-man?command=chmod&section=2
>  ]
> which behaviour I can reproduce 'outside' perl:
> 
> $ touch foo
> $ chmod 2777 foo
> $ chmod 1777 foo
> $ chmod 2777 foo
> chmod: foo: Inappropriate file type or format
> 
> > > $ ./perl harness -v ../lib/filetest.t
> > > #   Failed test 'filetest.tst should not be recognized as
> writable'
> > > #   at ../lib/filetest.t line 80.
> > > #          got: '1'
> > > #     expected: undef
> > >
> > > #   Failed test 'filetest.tst should not be recognized as
> writable'
> > > #   at ../lib/filetest.t line 82.
> > > #          got: '1'
> > > #     expected: undef
> > > # Looks like you failed 2 tests of 15.
> >
> > This is basically doing:
> >
> >     system "chflags uchg foo";
> >     use filetest 'access';
> >     print "ok\n" if ! -w "foo"
> >     print "ok\n" if ! -W "foo"
> >
> > Since I have no idea what chflags does, I can't comment further.
> 
> chflags is similar to chattr on Linux from what I can gather. It
> wasn't
> something I was aware of until I found this test failing.
> [ http://leaf.dragonflybsd.org/cgi/web-man?command=chflags&section=1 ]
> 
> On Dragonfly:
> 
> $ touch foo
> $ if [ -w foo ]; then echo "Yes"; fi
> Yes
> $ chflags uchg foo
> $ if [ -w foo ]; then echo "Yes"; fi
> Yes
> 
> On FreeBSD 7.4:
> 
> $ touch foo
> $ if [ -w foo ]; then echo "Yes"; fi
> Yes
> $ chflags uchg foo
> $ if [ -w foo ]; then echo "Yes"; fi
> $
> 
> I had raised this ticket so I didn't forget the test failures this
> time :(
> 

Are these failures still appearing with 5.18.0?

And, assuming they are, do we have an idea how to fix them for this OS
-- or what the right thing should be?

Thank you very much.
Jim Keenan



---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=116851

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About