-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cz-14gzopen.t fails on AFS filesystem #56
Comments
Interesting. This test has existed for a very very very long time so I'm surprised nobody has tripped over this issue before. I need to add a preliminary test that checks that |
Be aware that when using
|
@djzhh Just looking at how I have the failing tests structure, I already do tests that check that the files I'm going to use are not-writable and not-readable respectively. For example, for the non-writable use case I do this chmod 0444, $name
or skip "Cannot create non-writable file", 3 ;
skip "Cannot create non-writable file", 3
if -w $name ;
ok ! -w $name, " input file not writable"; Once the code above runs successfully Perl thinks that the file Think my best option is to try to write data to the non-writable file and read data from the non-readable file. Below is a proposed change for the two failing tests. If you have the time, could you give them a go with your AFS setup please? {
title 'read/write a non-readable/writable file';
SKIP:
{
skip "Cannot create non-writable file", 3
if $^O eq 'cygwin';
my $lex = LexFile->new( my $name );
writeFile($name, "abc");
chmod 0444, $name
or skip "Cannot create non-writable file", 3 ;
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") ;
ok !$fil, " gzopen returns undef" ;
ok $gzerrno, " gzerrno ok" or
diag " gzerrno $gzerrno\n";
chmod 0777, $name ;
}
SKIP:
{
my $lex = LexFile->new( my $name );
skip "Cannot create non-readable file", 3
if $^O eq 'cygwin';
writeFile($name, "abc");
chmod 0222, $name ;
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") ;
ok !$fil, " gzopen returns undef" ;
ok $gzerrno, " gzerrno ok";
chmod 0777, $name ;
}
} |
The test does not complain any longer. Thanks a lot, esp. as compiling in AFS is not so common. |
Good job!
I know of AFS, but I've never used it. |
Test fails for perl-5.36.3 and perl-5.38.2 (no other versions tested) when compiling in an AFS-part of the filesystem.
Compiling in e.g.
/var/tmp
works fine, though../Configure
detects that the sources reside in AFS:AFS may be running... I'll be extra cautious then...
The errors detected are:
They correspond directly to tests using
chmod
(line numbers at the beginning):The tests must fail as there is no such thing as file-based ACLs in AFS; see https://docs.openafs.org/UserGuide/HDRWQ46.html
I assume that these tests should be
skip
ped when compiled in an AFS-directory as a workaround.Just for completeness:
The text was updated successfully, but these errors were encountered: