com php-src: Make proc_open_bug69900.phpt mor e robust against parallelization: ext/standard/tests/ streams/proc_open_bug69900.phpt

From: Date: Wed, 20 Feb 2019 10:20:14 +0000
Subject: com php-src: Make proc_open_bug69900.phpt mor e robust against parallelization: ext/standard/tests/ streams/proc_open_bug69900.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-104771@lists.php.net to get a copy of this message
Commit: 0513d59ed33c3439b2fb52bc39feff18a2b5436a Author: Nikita Popov <nikita.ppv@gmail.com> Tue, 19 Feb 2019 15:13:11 +0100 Parents: f5872614d87c120e64b94fe1686005da9f53bc2d Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0513d59ed33c3439b2fb52bc39feff18a2b5436a Log: Make proc_open_bug69900.phpt more robust against parallelization With multiple workers running this might take more than 1ms. Bump this up to the same threshold that was already used for CI. Bugs: https://bugs.php.net/69900 Changed paths: M ext/standard/tests/streams/proc_open_bug69900.phpt Diff: diff --git a/ext/standard/tests/streams/proc_open_bug69900.phpt b/ext/standard/tests/streams/proc_open_bug69900.phpt index 20d3cba..8e0c99f 100644 --- a/ext/standard/tests/streams/proc_open_bug69900.phpt +++ b/ext/standard/tests/streams/proc_open_bug69900.phpt @@ -6,7 +6,7 @@ Bug #69900 Commandline input/output weird behaviour with STDIO error_reporting(E_ALL); $fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test69900.php"; -$max_ms = ((bool)getenv('TRAVIS') || (bool)getenv('APPVEYOR')) ? 10 : 1; +$max_ms = 10; $test_content = '<?php @@ -34,7 +34,13 @@ for($i = 0; $i < 10; $i++){ $t1 = microtime(1); echo $s; - echo "fgets() took ", (($t1 - $t0)*1000 > $max_ms ? 'more' : 'less'), " than $max_ms ms\n"; + + $dt_ms = ($t1 - $t0)*1000; + if ($dt_ms > $max_ms) { + echo "fgets() took more than $max_ms ms ($dt_ms ms)\n"; + } else { + echo "fgets() took less than $max_ms ms\n"; + } } fclose($pipes[0]); @@ -51,7 +57,7 @@ $fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test69900.php"; ?> --EXPECTF-- hello0 -fgets() took more than %d ms +fgets() took more than %d ms (%s ms) hello1 fgets() took less than %d ms hello2

« previous php.cvs (#104771) next »