Skip to content

Commit d3994ca

Browse files
committed
t/op/require_errors.t, t/op/stat.t: skip permissions test on AFS
Fixes Perl#22068 Fixes Perl#22067
1 parent fe31e2a commit d3994ca

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

t/op/require_errors.t

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,15 @@ SKIP: {
177177
push @INC, '../lib';
178178
require Cwd;
179179
require File::Spec::Functions;
180+
require Config;
180181
if ($^O eq 'cygwin') {
181182
require Win32;
182183
}
183184

185+
my $cwd = Cwd::getcwd();
186+
skip "AFS", 2 # github 22068
187+
if $Config::Config{afs} eq "true" && $cwd && $cwd =~ /^\Q$Config::Config{afsroot}/;
188+
184189
# Going to try to switch away from root. Might not work.
185190
# (stolen from t/op/stat.t)
186191
my $olduid = $>;
@@ -196,9 +201,9 @@ SKIP: {
196201

197202
SKIP: {
198203
skip "Can't make the path absolute", 1
199-
if !defined(Cwd::getcwd());
204+
if !defined $cwd;
200205

201-
my $file = File::Spec::Functions::catfile(Cwd::getcwd(), $mod_file);
206+
my $file = File::Spec::Functions::catfile($cwd, $mod_file);
202207
eval {
203208
require($file);
204209
};

t/op/stat.t

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,10 @@ SKIP: {
548548
}
549549

550550
# [perl #4253]
551+
SKIP:
551552
{
553+
skip "AFS", 3 # github 22067
554+
if $Config{afs} eq "true" && ($Curdir eq '.' || $Curdir =~ /^\Q$Config{afsroot}/);
552555
ok(open(F, ">", $tmpfile), 'can create temp file');
553556
close F;
554557
chmod 0077, $tmpfile;

0 commit comments

Comments
 (0)