develooper Front page | perl.perl5.porters | Postings from December 2012

[perl #116250] skip count is wrong for timeout in dist/Tie-File/t/29_downcopy.t

From:
Nicholas Clark
Date:
December 30, 2012 11:04
Subject:
[perl #116250] skip count is wrong for timeout in dist/Tie-File/t/29_downcopy.t
Message ID:
rt-3.6.HEAD-17500-1356865477-1302.116250-75-0@perl.org
# New Ticket Created by  Nicholas Clark 
# Please include the string:  [perl #116250]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=116250 >


On Tue, Dec 25, 2012 at 06:22:00PM -0500, George Greer wrote:
> Smoke logs available at http://m-l.org/~perl/smoke/perl/linux/blead_clang_quick/log8d40577bdbdfa85ed3293f84bf26a313b1b92f55.log.gz
> 
> Automated smoke report for 5.17.8 patch 8d40577bdbdfa85ed3293f84bf26a313b1b92f55 v5.17.7.0-107-g8d40577
> zwei: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz (GenuineIntel 2668MHz) (x86_64/8 cpu)

> Testsuite was run only with 'harness'
> 
> Failures: (common-args) -Accflags=-DPERL_POISON -Dcc=clang
> [default] 
> ../dist/Tie-File/t/29_downcopy.t............................FAILED
>     443-444
>     Bad plan.  You planned 718 tests but ran 716.

I infer that the "bad plan" is because the skip count is wrong if the
timeout hits. The main test code looks like this:

sub try {
  my ($pos, $len, $newlen) = @_;

...

  if ($err) {
    if ($err =~ /^Alarm clock/) {
      print "# Timeout\n";
      print "not ok $N\n"; $N++;
      print "not ok $N\n"; $N++;
      return;
    } else {
      $@ = $err;
      die;
    }
  }

...

  if (defined $len) {
    try($pos, undef, $newlen);
  }
}


Hence if try() is called with a $len defined and timeout hits, it prints out
two "not ok"s, then returns immediately. Whereas in the normal case (no
timeout) it runs 4 tests - the 2 at this level, and 2 more when it recurses.

Nicholas Clark




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