]> granicus.if.org Git - php/commitdiff
Increase failure threshold for 'extensive backtracking' fileinfo test
authorAlex Dowad <alexinbeijing@gmail.com>
Wed, 24 Jun 2020 06:43:49 +0000 (08:43 +0200)
committerAlex Dowad <alexinbeijing@gmail.com>
Wed, 24 Jun 2020 06:46:19 +0000 (08:46 +0200)
A spurious failure for this test was seen on Travis CI (S390X):

https://travis-ci.org/github/alexdowad/php-src/jobs/701533828

(The test is expected to finish within 1 second, but it took 1.06 seconds.)
Therefore, increase the threshold a bit.

ext/fileinfo/tests/cve-2014-3538.phpt

index a52386118674836aa75d767f039c401b6920ccf3..0ff2a68685b7e57330edf76953e7e6a7baf987cf 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Bug #66731: file: extensive backtraking
+Bug #66731: file: extensive backtracking
 --SKIPIF--
 <?php
 if (!class_exists('finfo'))
@@ -20,7 +20,7 @@ $t = microtime(true);
 var_dump(finfo_file($fi, $fd));
 $t = microtime(true) - $t;
 finfo_close($fi);
-if ($t < 1) {
+if ($t < 1.5) {
     echo "Ok\n";
 } else {
     printf("Failed, time=%.2f\n", $t);