diff --git a/t/op/require_errors.t b/t/op/require_errors.t index 2d7c587e11e69..ec8d4091fdefe 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 + 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 b391dd0e7c836..f69fa5cfa890d 100644 --- a/t/op/stat.t +++ b/t/op/stat.t @@ -548,7 +548,10 @@ SKIP: { } # [perl #4253] +SKIP: { + skip "AFS", 1 + if $Config{afs} eq "true" && ($Curdir eq '.' || $Curdir =~ /^\Q$Config{afsroot}/); ok(open(F, ">", $tmpfile), 'can create temp file'); close F; chmod 0077, $tmpfile;