@@ -2650,7 +2650,7 @@ function run_test(string $php, $file, array $env): string
2650
2650
2651
2651
$ wanted_re = null ;
2652
2652
}
2653
- if (!$ passed && !$ retried && $ retriable && error_may_be_retried ($ output )) {
2653
+ if (!$ passed && !$ retried && $ retriable && error_may_be_retried ($ test , $ output )) {
2654
2654
$ retried = true ;
2655
2655
goto retry;
2656
2656
}
@@ -2832,9 +2832,10 @@ function run_test(string $php, $file, array $env): string
2832
2832
return $ restype [0 ] . 'ED ' ;
2833
2833
}
2834
2834
2835
- function error_may_be_retried (string $ output ): bool
2835
+ function error_may_be_retried (TestFile $ test , string $ output ): bool
2836
2836
{
2837
- return preg_match ('((timed out)|(connection refused)|(404: page not found)|(address already in use)|(mailbox already exists))i ' , $ output ) === 1 ;
2837
+ return preg_match ('((timed out)|(connection refused)|(404: page not found)|(address already in use)|(mailbox already exists))i ' , $ output ) === 1
2838
+ || $ test ->hasSection ('FLAKY ' );
2838
2839
}
2839
2840
2840
2841
function expectf_to_regex (?string $ wanted ): string
@@ -3727,6 +3728,7 @@ class TestFile
3727
3728
'INI ' , 'ENV ' , 'EXTENSIONS ' ,
3728
3729
'SKIPIF ' , 'XFAIL ' , 'XLEAK ' , 'CLEAN ' ,
3729
3730
'CREDITS ' , 'DESCRIPTION ' , 'CONFLICTS ' , 'WHITESPACE_SENSITIVE ' ,
3731
+ 'FLAKY ' ,
3730
3732
];
3731
3733
3732
3734
/**
0 commit comments