From 3e3ed419d20543f385cc675c73fe3c0e79a1eabe Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Tue, 12 Mar 2024 10:38:06 +1100 Subject: [PATCH] t/op/require_errors.t, t/op/stat.t: skip permissions test on AFS Fixes #22068 Fixes #22067 --- t/op/require_errors.t | 9 +++++++-- t/op/stat.t | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/t/op/require_errors.t b/t/op/require_errors.t index 2d7c587e11e6..01458fefbb09 100644 --- a/t/op/require_errors.t +++ b/t/op/require_errors.t @@ -177,10 +177,15 @@ SKIP: { push @INC, '../lib'; require Cwd; require File::Spec::Functions; + require Config; if ($^O eq 'cygwin') { require Win32; } + my $cwd = Cwd::getcwd(); + skip "AFS", 2 # github 22068 + if $Config::Config{afs} eq "true" && $cwd && $cwd =~ /^\Q$Config::Config{afsroot}/; + # Going to try to switch away from root. Might not work. # (stolen from t/op/stat.t) my $olduid = $>; @@ -196,9 +201,9 @@ SKIP: { SKIP: { skip "Can't make the path absolute", 1 - if !defined(Cwd::getcwd()); + if !defined $cwd; - my $file = File::Spec::Functions::catfile(Cwd::getcwd(), $mod_file); + my $file = File::Spec::Functions::catfile($cwd, $mod_file); eval { require($file); }; diff --git a/t/op/stat.t b/t/op/stat.t index b391dd0e7c83..056d719c1fad 100644 --- a/t/op/stat.t +++ b/t/op/stat.t @@ -548,7 +548,10 @@ SKIP: { } # [perl #4253] +SKIP: { + skip "AFS", 3 # github 22067 + if $Config{afs} eq "true" && ($Curdir eq '.' || $Curdir =~ /^\Q$Config{afsroot}/); ok(open(F, ">", $tmpfile), 'can create temp file'); close F; chmod 0077, $tmpfile;