Change 28572 by [EMAIL PROTECTED] on 2006/07/14 14:38:28
Skip tests for pathconf() and fpathconf() on HP-UX for
_PC_CHOWN_RESTRICTED. The HP-UX manpage suggests not trying
to do it, and that the errno will not be set on failure.
Affected files ...
... //depot/perl/ext/POSIX/t/sysconf.t#6 edit
Differences ...
==== //depot/perl/ext/POSIX/t/sysconf.t#6 (text) ====
Index: perl/ext/POSIX/t/sysconf.t
--- perl/ext/POSIX/t/sysconf.t#5~28540~ 2006-07-11 00:48:24.000000000 -0700
+++ perl/ext/POSIX/t/sysconf.t 2006-07-14 07:38:28.000000000 -0700
@@ -58,10 +58,14 @@
or skip "could not open current directory ($!)", 3 * @path_consts;
for my $constant (@path_consts) {
- $r = eval { fpathconf( $fd, eval "$constant()" ) };
- is( $@, '', "calling fpathconf($fd, $constant) " );
- ok( defined $r, "\tchecking that the returned value is defined: $r" );
- ok( looks_like_number($r), "\tchecking that the returned value looks
like a number" );
+ SKIP: {
+ skip "_PC_CHOWN_RESTRICTED is unreliable on HP-UX", 3
+ if $^O eq "hpux" && $constant eq "_PC_CHOWN_RESTRICTED";
+ $r = eval { fpathconf( $fd, eval "$constant()" ) };
+ is( $@, '', "calling fpathconf($fd, $constant) " );
+ ok( defined $r, "\tchecking that the returned value is defined:
$r" );
+ ok( looks_like_number($r), "\tchecking that the returned value
looks like a number" );
+ }
}
POSIX::close($fd);
@@ -69,10 +73,14 @@
# testing pathconf() on a non-terminal file
for my $constant (@path_consts) {
- $r = eval { pathconf( $curdir, eval "$constant()" ) };
- is( $@, '', qq[calling pathconf("$curdir", $constant)] );
- ok( defined $r, "\tchecking that the returned value is defined: $r" );
- ok( looks_like_number($r), "\tchecking that the returned value looks like
a number" );
+ SKIP: {
+ skip "_PC_CHOWN_RESTRICTED is unreliable on HP-UX", 3
+ if $^O eq "hpux" && $constant eq "_PC_CHOWN_RESTRICTED";
+ $r = eval { pathconf( $curdir, eval "$constant()" ) };
+ is( $@, '', qq[calling pathconf("$curdir", $constant)] );
+ ok( defined $r, "\tchecking that the returned value is defined: $r" );
+ ok( looks_like_number($r), "\tchecking that the returned value looks
like a number" );
+ }
}
SKIP: {
End of Patch.