From: Nicholas Clark Date: Mon, 22 Mar 2004 21:05:09 +0000 (+0000) Subject: Don't assume that the chmod will always work. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ff2be7edd67a7f5ccf9d60bb41eaaf8b3bef359e;p=p5sagit%2Fp5-mst-13.2.git Don't assume that the chmod will always work. (It won't for files on *BSD where chflags has set uchg, which is what the OS X perforce client does) p4raw-id: //depot/perl@22559 --- diff --git a/t/op/filetest.t b/t/op/filetest.t index d0ca69a..271c4f0 100755 --- a/t/op/filetest.t +++ b/t/op/filetest.t @@ -19,8 +19,8 @@ ok( !-d 'TEST' ); ok( -r 'TEST' ); # make sure TEST is r-x -eval { chmod 0555, 'TEST' }; -$bad_chmod = $@; +eval { chmod 0555, 'TEST' or die "chmod 0555, 'TEST' failed: $!" }; +chomp ($bad_chmod = $@); $oldeuid = $>; # root can read and write anything eval '$> = 1'; # so switch uid (may not be implemented) @@ -35,7 +35,7 @@ SKIP: { skip('we cannot chmod symlinks'); } elsif ($bad_chmod) { - skip( $@ ); + skip( $bad_chmod ); } else { ok( !-w 'TEST' );