develooper Front page | perl.perl5.porters | Postings from July 2011

eu_command.t (was Re: Smoke [blead] v5.15.0-163-g17d5d82 FAIL(FM)MSWin32 Win2000 SP4 (x86/1 cpu))

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
July 4, 2011 03:41
Subject:
eu_command.t (was Re: Smoke [blead] v5.15.0-163-g17d5d82 FAIL(FM)MSWin32 Win2000 SP4 (x86/1 cpu))
Message ID:
20110704104146.GP23881@plum.flirble.org
On Sun, Jul 03, 2011 at 03:18:00PM -0400, George Greer wrote:
> Smoke logs available at http://m-l.org/~perl/smoke/perl/
> 
> Automated smoke report for 5.15.0 patch 17d5d82df211d3a348c01e0ec2d38816bf89823a v5.15.0-163-g17d5d82
> perl-win2k: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz(~2673 MHz) (x86/1 cpu)
>     on        MSWin32 - Win2000 SP4
>     using     cl version 14.00.50727.762
>     smoketime 2 hours 26 minutes (average 36 minutes 41 seconds)

> [default] -Duseithreads
> ../cpan/Memoize/t/expmod_t.t................................FAILED
>     10, 14
> ../dist/ExtUtils-Command/t/eu_command.t.....................FAILED
>     8
>     Non-zero exit status: 1

../dist/ExtUtils-Command/t/cp.t ................................... ok

#   Failed test 'newer file created'
#   at t/eu_command.t line 78.
#     '1'
#         >=
#     '2'
# Looks like you failed 1 test of 40.

The test code in question is:

    my ($now) = time;
    utime ($now, $now, $ARGV[0]);
    sleep 2;

    # Just checking modify time stamp, access time stamp is set
    # to the beginning of the day in Win95.
    # There's a small chance of a 1 second flutter here.
    my $stamp = (stat($ARGV[0]))[9];
    cmp_ok( abs($now - $stamp), '<=', 1, 'checking modify time stamp' ) ||
      diag "mtime == $stamp, should be $now";

    @ARGV = qw(newfile);
    touch();

    my $new_stamp = (stat('newfile'))[9];
    cmp_ok( abs($new_stamp - $stamp), '>=', 2,  'newer file created' );

perlfunc.pod notes:

    On some older systems, it may sleep up to a full second less than what
    you requested, depending on how it counts seconds.


Given that Windows NT development started before Linux development, does that
mean that it's one of these "older systems"? :-)

But, whether it is or not, does that mean that the test's assumptions are
unwise, that C<sleep 2> is enough to make a new file not less than 2 seconds
newer?

Nicholas Clark

Thread Previous | 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