}
}
{
- fresh_perl_is('
+ my $is_cygwin = $^O eq "cygwin";
+ local $::TODO = "this flaps on github cygwin vm, but not on cygwin iron #18129"
+ if $is_cygwin;
+ my $expected = "Timeout";
+ my $code = '
BEGIN{require q(test.pl);}
watchdog(3);
- $SIG{ALRM} = sub {print "Timeout\n"; exit(1)};
+ $SIG{ALRM} = sub {print "'.$expected.'\n"; exit(1)};
alarm 1;
$_ = "a" x 1000 . "b" x 1000 . "c" x 1000;
/.*a.*b.*c.*[de]/;
- ',"Timeout",{},"Test Perl 73464")
+ print "increase the multipliers in the regex above to run the regex longer";
+ ';
+ # this flaps on github cygwin vm, but not on cygwin iron #18129
+ # so on cygwin it's run for 50 seconds to see if it fails eventually
+ my $max = $is_cygwin ? 50 : 1;
+ my ($iter, $result, $status);
+ for my $i (1..$max) {
+ $iter = $i;
+ $result = fresh_perl($code,{});
+ $status = $?;
+ last if $result ne $expected;
+ }
+ is($result, $expected, "Test Perl 73464")
+ or diag "PROG:", $code, "STATUS:", $status, "failed on iteration: $iter";
}
{ # [perl #128686], crashed the the interpreter