You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
can_write_dir.t and Packlist.t fail when Perl is compiled within AFS filesystem (perl-5.38.2 and perl-5.36.3) but works fine within the local filesystem:
can_write_dir.t:
cpan/ExtUtils-Install/t/can_write_dir ............................
# Failed test at t/can_write_dir.t line 50.
# Structures begin differing at:
# $got->[0] = '1'
# $expected->[0] = '0'
# Failed test at t/can_write_dir.t line 51.
# Structures begin differing at:
# $got->[0] = '1'
# $expected->[0] = '0'
# Looks like you failed 2 tests of 12.
FAILED at test 7
Test snippet:
45 ok chmod 0555, $exists, 'make read only';
46
47 skip "Current user or OS cannot create directories that they cannot read", 6
48 if -w $exists; # these tests require a directory we cant read
49
50 is_deeply [can_write_dir($exists)], [0, $exists];
51 is_deeply [can_write_dir($subdir)], [0, $exists, $subdir];
Packlist.t
cpan/ExtUtils-Install/t/Packlist .................................
# Failed test 'write() should croak on open failure'
# at t/Packlist.t line 92.
# ''
# doesn't match '(?^:Can't open file)'
# Looks like you failed 1 test of 35.
FAILED at test 18
Test snippet:
86 chmod 0444, 'eplist';
87
88 SKIP: {
89 skip("cannot write readonly files", 1) if -w 'eplist';
90
91 eval { ExtUtils::Packlist::write({}, 'eplist') };
92 like( $@, qr/Can't open file/, 'write() should croak on open failure' );
93 }
The test must fail as there is no such thing as file-based ACLs in AFS; see https://docs.openafs.org/UserGuide/HDRWQ46.html
Instead ACLs are set on directories. As AFS is not that common, so below you'll find an example. Anyhow, ./Configure detects AFS and displays a notice "AFS may be running... I'll be extra cautious then..."
% systemctl status afs.mount
● afs.mount - /afs
Loaded: loaded (/proc/self/mountinfo)
Active: active (mounted) since Fri 2024-01-19 13:28:15 CET; 1 month 16 days ago
Until: Fri 2024-01-19 13:28:15 CET; 1 month 16 days ago
Where: /afs
What: AFS
% mkdir demo
% cd demo
% fs listacl -path .
Access list for . is
Normal rights:
username rlidwka
system:administrators rlidwka
system:anyuser l
% echo Hello World > a_file
% ls -ld a_file
-rw-r--r--. 1 username grp 12 Mar 6 02:34 a_file
% cat a_file
Hello World
% chmod 0000 a_file
% ls -ld a_file
----------. 1 username grp 12 Mar 6 02:34 a_file
% getfacl a_file
# file: a_file
# owner: username
# group: grp
user::---
group::---
other::---
% cat a_file
Hello World
% echo "Have a nice day" >> a_file
% cat a_file
Hello World
Have a nice day
I am not familiar with Perl tests, but anyhow propose these patches:
can_write_dir
diff -p old/cpan/ExtUtils-Install/t/can_write_dir.t new/cpan/ExtUtils-Install/t/can_write_dir.t
*** old/cpan/ExtUtils-Install/t/can_write_dir.t 2023-11-28 12:57:27.000000000 +0100
--- new/cpan/ExtUtils-Install/t/can_write_dir.t 2024-03-12 23:27:30.000000000 +0100
***************
*** 5,10 ****
--- 5,11 ----
use strict;
use ExtUtils::Install;
use File::Spec;
+ use Config;
{ package FS; our @ISA = qw(File::Spec); }
# Alias it for easier access
*************** is_deeply [can_write_dir($abs_dne)],
*** 35,43 ****
--- 36,47 ----
];
SKIP: {
+ my $Curdir = File::Spec→curdir;
my $exists = FS->catdir(qw(exists));
my $subdir = FS->catdir(qw(exists subdir));
+ skip "AFS", 8
+ if $Config{afs} eq "true" && ($Curdir eq '.' || $Curdir =~ /^\Q$Config{afsroot}/);
ok mkdir $exists;
END { rmdir $exists }
*************** SKIP: {
Packlist
diff -p cpan/ExtUtils-Install/t/Packlist.t new/cpan/ExtUtils-Install/t/Packlist.t
*** old/cpan/ExtUtils-Install/t/Packlist.t 2023-11-28 12:57:27.000000000 +0100
--- new/cpan/ExtUtils-Install/t/Packlist.t 2024-03-13 00:14:32.000000000 +0100
*************** ok( $file_is_ready, 'write() can write a
*** 80,93 ****
local *IN;
SKIP: {
skip('cannot write files, some tests difficult', 3) unless $file_is_ready;
# set this file to read-only
chmod 0444, 'eplist';
! SKIP: {
skip("cannot write readonly files", 1) if -w 'eplist';
!
eval { ExtUtils::Packlist::write({}, 'eplist') };
like( $@, qr/Can't open file/, 'write() should croak on open failure' );
}
--- 80,94 ----
local *IN;
SKIP: {
+ require Config;
skip('cannot write files, some tests difficult', 3) unless $file_is_ready;
# set this file to read-only
chmod 0444, 'eplist';
! SKIP: {
skip("cannot write readonly files", 1) if -w 'eplist';
! skip "AFS" if $Config::Config{afs};
eval { ExtUtils::Packlist::write({}, 'eplist') };
like( $@, qr/Can't open file/, 'write() should croak on open failure' );
}
The text was updated successfully, but these errors were encountered:
can_write_dir.t
andPacklist.t
fail when Perl is compiled within AFS filesystem (perl-5.38.2 and perl-5.36.3) but works fine within the local filesystem:can_write_dir.t
:Test snippet:
Packlist.t
Test snippet:
The test must fail as there is no such thing as file-based ACLs in AFS; see https://docs.openafs.org/UserGuide/HDRWQ46.html
Instead ACLs are set on directories. As AFS is not that common, so below you'll find an example. Anyhow,
./Configure
detects AFS and displays a notice"AFS may be running... I'll be extra cautious then..."
I am not familiar with Perl tests, but anyhow propose these patches:
The text was updated successfully, but these errors were encountered: