Skip to content

Commit

Permalink
#56 cz-14gzopen.t fails on AFS filesystem
Browse files Browse the repository at this point in the history
  • Loading branch information
pmqs committed Mar 6, 2024
1 parent ddfe675 commit 68dcf0a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions t/cz-14gzopen.t
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,17 @@ foreach my $stdio ( ['-', '-'], [*STDIN, *STDOUT])
skip "Cannot create non-writable file", 3
if -w $name ;

# double check non-writable for AFS
my $written = do {
no warnings;
my $fh;
open $fh, '>', $name &&
print $fh "hello world"
};

skip "Cannot create non-writable file", 3
if $written ;

ok ! -w $name, " input file not writable";

my $fil = gzopen($name, "wb") ;
Expand All @@ -522,6 +533,17 @@ foreach my $stdio ( ['-', '-'], [*STDIN, *STDOUT])
skip "Cannot create non-readable file", 3
if -r $name ;

# double check non-readable for AFS
my $readable = do {
no warnings;
my $fh;
open $fh, '<', $name &&
read $fh, my $data, 1
};

skip "Cannot create non-writable file", 3
if $readable ;

ok ! -r $name, " input file not readable";
$gzerrno = 0;
my $fil = gzopen($name, "rb") ;
Expand Down

0 comments on commit 68dcf0a

Please sign in to comment.