develooper Front page | perl.perl6.internals | Postings from July 2008

[perl #57486] [patch] Fix stat / lstat test failure on Cygwin

Thread Next
From:
Donald Hunter
Date:
July 31, 2008 16:03
Subject:
[perl #57486] [patch] Fix stat / lstat test failure on Cygwin
Message ID:
rt-3.6.HEAD-29759-1217542594-1262.57486-72-0@perl.org
# New Ticket Created by  Donald Hunter 
# Please include the string:  [perl #57486]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57486 >


This is a patch for t/pmc/os.t to fix test failures on Cygwin. This is
generated against revision 29913.

The stat and lstat tests in t/pmc/os.t were failing on one install of Cygwin
and not another. It turns out that the expected output generated by the
installed Perl 5 was different on each system. This must be due to the
implicit conversion from integer to decimal string by join().

I've changed the test to sprintf("0x%08x\n" x 13) the result of stat and I
get consistent output on both Cygwin installations. I'm guessing this is
also more portable.

I also coalesced the Cygwin test back into the main test because Cygwin has
13 fields in the stat result. It's only Win32 that has 11 fields.

One anomaly remains. The test was skipping the inode field for Cygwin
because the installed Perl 5 is generating a longer number so I'm masking
it. I will need to investigate why Perl 5 generates a larger inode value
than Parrot. (Maybe stat is actually broken in Parrot on Cygwin).

Cheers,
Donald Hunter.


Thread Next


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