Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Problem compiling Perl 5.14.2 - op/stat.t test 37 failed

by Eliya (Vicar)
on May 30, 2012 at 11:39 UTC ( #973263=note: print w/ replies, xml ) Need Help??


in reply to Problem compiling Perl 5.14.2 - op/stat.t test 37 failed

You might want to modify the respective test to figure out what ls and Perl disagree on, e.g.

my $try = sub { # line 287 my @c1 = eval qq[\$DEV =~ /^$_[0].*/mg]; my @c2 = eval qq[grep { $_[1] "/dev/\$_" } \@DEV]; ### add this if ($_[1] eq "-c") { my @c = map { /(\S+)$/; $1 } @c1; my %diff; @diff{@c} = (); delete @diff{@c2}; print "!!: $_\n" for keys %diff; exit; } ### my $c1 = scalar @c1; my $c2 = scalar @c2; is($c1, $c2, "ls and $_[1] agreeing on /dev ($c1 $c2)"); };

and then contemplate on who is right with respect to whether the reported entry is a "character special" file.


Comment on Re: Problem compiling Perl 5.14.2 - op/stat.t test 37 failed
Select or Download Code
Re^2: Problem compiling Perl 5.14.2 - op/stat.t test 37 failed
by mrthom (Novice) on May 30, 2012 at 12:09 UTC
    OK, i ran this, exactly same code as you wrote above and got:
    ok 34 - -e ok 35 - -e on unlinked file ok 36 - ls and -b agreeing on /dev (29 29) !!: 0 # Looks like you planned 107 tests but ran 36.

    I dont really uderstand these commands, I only want successfully compile this, so sry, but I must ask what now ?? I can provide this info:

    [tom@alarmpi perl-5.14.2]$ find /dev/ -type c | wc -l 232

      The test runs ls -l /dev 2>/dev/null (which is different from find /dev/ -type c in that it isn't recursive); so check what its output is.

      Or simply print out @c1 in the test, and look for which (presumably fake) entry ends with " 0" and starts with a "c".  (For example, in my case there is a line "total 0" — but as the latter starts with a "t", it doesn't interfere with the test...)

      In other words, my guess would be this is something silly you need not really worry about, provided it's the only test that fails...

        Hey! THX i found it :D It problem in Czech localized output from this command:

        ls -l /dev 2>/dev/null

        Output

        [tom@alarmpi perl-5.14.2]$ ls -l /dev 2>/dev/null celkem 0 crw------- 1 root root 10, 235 1. led 1970 autofs drwxr-xr-x 2 root root 620 30. kvě 09.59 block drwxr-xr-x 2 root root 60 30. kvě 09.59 bsg

        The first line is "celkem" that means total in english and begins with c. So, please correct it and remove the first line from the test and post a patch please :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://973263]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2014-12-20 02:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls