Skip to content

Commit

Permalink
t/op/require_errors.t, t/op/stat.t: skip permissions test on AFS
Browse files Browse the repository at this point in the history
  • Loading branch information
tonycoz committed Mar 12, 2024
1 parent 1d2f32c commit ddb756c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 7 additions & 2 deletions t/op/require_errors.t
Original file line number Diff line number Diff line change
Expand Up @@ -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 = $>;
Expand All @@ -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);
};
Expand Down
3 changes: 3 additions & 0 deletions t/op/stat.t
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ddb756c

Please sign in to comment.