develooper Front page | perl.perl5.porters | Postings from June 2008

[perl #51276] ext/POSIX/t/sysconf.t makes too many assumptions

From:
Steve Peters via RT
Date:
June 5, 2008 18:49
Subject:
[perl #51276] ext/POSIX/t/sysconf.t makes too many assumptions
Message ID:
rt-3.6.HEAD-11257-1212716989-972.51276-15-0@perl.org
On Fri Feb 29 06:39:34 2008, nicholas wrote:
> 
> This is a bug report for perl from nick@ccl4.org,
> generated with the help of perlbug 1.36 running under perl 5.11.0.
> 
> 
> -----------------------------------------------------------------
> [Please enter your report here]
> 
> Problem:
> 
> $ df .
> Filesystem 1K-blocks      Used    Avail Capacity  Mounted on
> nas:/data  258199522 203410128 34133434    86%    /filer
> ^^^^
> 
> Symptom:
> 
> $ ./perl harness ../ext/POSIX/t/sysconf.t
> ../ext/POSIX/t/sysconf......1/87
> #   Failed test '       checking that the returned value is defined
>    (it isn't) or that errno is clear (it isn't, it's Invalid
>    argument)'
> #   at ../ext/POSIX/t/sysconf.t line 65.
> 
> #   Failed test '       checking that the returned value is defined
>    (it isn't) or that errno is clear (it isn't, it's Invalid
>    argument)'
> #   at ../ext/POSIX/t/sysconf.t line 65.
> 
> #   Failed test '       checking that the returned value is defined
>    (it isn't) or that errno is clear (it isn't, it's Invalid
>    argument)'
> #   at ../ext/POSIX/t/sysconf.t line 65.
> 
> #   Failed test '       checking that the returned value is defined
>    (it isn't) or that errno is clear (it isn't, it's Invalid
>    argument)'
> #   at ../ext/POSIX/t/sysconf.t line 65.
> 
> #   Failed test '       checking that the returned value is defined
>    (it isn't) or that errno is clear (it isn't, it's Invalid
>    argument)'
> #   at ../ext/POSIX/t/sysconf.t line 65.
> 
> #   Failed test '       checking that the returned value is defined
>    (it isn't) or that errno is clear (it isn't, it's Invalid
>    argument)'
> #   at ../ext/POSIX/t/sysconf.t line 65.
> 
> #   Failed test '       checking that the returned value is defined
>    (it isn't) or that errno is clear (it isn't, it's Invalid
>    argument)'
> #   at ../ext/POSIX/t/sysconf.t line 65.
> 
> #   Failed test '       checking that the returned value is defined
>    (it isn't) or that errno is clear (it isn't, it's Invalid
>    argument)'
> #   at ../ext/POSIX/t/sysconf.t line 65.
> 
> #   Failed test '       checking that the returned value is defined
>    (it isn't) or that errno is clear (it isn't, it's Invalid
>    argument)'
> #   at ../ext/POSIX/t/sysconf.t line 65.
> 
> #   Failed test '       checking that the returned value is defined
>    (it isn't) or that errno is clear (it isn't, it's Invalid
>    argument)'
> #   at ../ext/POSIX/t/sysconf.t line 65.
> # Looks like you failed 10 tests of 87.
> ../ext/POSIX/t/sysconf...... Dubious, test returned 10 (wstat 2560,
>    0xa00)
>  Failed 10/87 subtests
>         (less 11 skipped subtests: 66 okay)
> 
> Test Summary Report
> -------------------
> ../ext/POSIX/t/sysconf.t (Wstat: 2560 Tests: 87 Failed: 10)
>   Failed tests:  2, 5, 8, 11, 14, 17, 20, 23, 26, 29
>   Non-zero exit status: 10
> Files=1, Tests=87,  0 wallclock secs ( 0.05 usr  0.02 sys +  0.14 cusr
>    0.03 csys =  0.23 CPU)
> Result: FAIL
> Failed 1/1 test programs. 10/87 subtests failed.
> 
> 
> Cause:
> 
> my $curdir = File::Spec->curdir;
> $curdir = VMS::Filespec::fileify($curdir) if $^O eq 'VMS';
> 
> ...
> 
> 
> Any reason why we should not be testing on the root directory instead?
> (at least on non-VMS. I have this horrid feeling that on VMS it's
>    quite
> possible to have the root directory of the volume you're on be
>    unreadable)
> 
> It's the least likely to be remote mounted. It would make the tests
>    pass
> here:
> 
> 
> $ cat pathconftest.c
> #include <unistd.h>
> #include <stdio.h>
> #include <errno.h>
> 
> int main (int argc, char **argv) {
>   while (*++argv) {
>     long result;
> 
>     errno = 0;
>     result = pathconf(*argv, _PC_NAME_MAX);
> 
>     printf ("%s\t%d\t%ld\n", *argv, errno, result);
>   }
>   return 0;
> }
> $ ./pathconftest / . /tmp
> /       0       255
> .       22      -1
> /tmp    0       255
> 
> 

This appears to have been resolved with change #33401.






nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About