A new performance test in re/pat.t added by v5.23.9-58-gd14d585 could
occasionally fails to a timing issue. It was checking that the the
test took less than 1 sec to run; but since the clock usually has a
granularity of 1 sec, it could fail if the test ran over a tick boundary.
Change the condition to <= 1 sec, and increase the time the test takes on
a bad perl - it was taking 4sec on my system; it now takes about 14sec,
so there's less chance of a bad perl passing.
# [perl #127855] Slowdown in m//g on COW strings of certain lengths
my $elapsed= -time;
my $len= 4e6;
- my $zeros= 10000;
+ my $zeros= 40000;
my $str= ( "0" x $zeros ) . ( "1" x ( $len - $zeros ) );
my $substr= substr( $str, 1 );
1 while $substr=~m/0/g;
$elapsed += time;
- ok( $elapsed < 1, "should not COW on long string with substr and m//g");
+ ok( $elapsed <= 1, "should not COW on long string with substr and m//g");
}
} # End of sub run_tests