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 4a3df8e
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
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", 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;
Expand Down

2 comments on commit 4a3df8e

@djzhh
Copy link

@djzhh djzhh commented on 4a3df8e Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perl harness complained with stat.t about too few tests (109 instead of 111); I am new to the test API, but the complaint vanishes when l.563 states "3" instead of "1"

@tonycoz
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this should be fixed now.

Please sign in to comment.