diff options
author | Anatol Belski <ab@php.net> | 2014-09-29 18:12:56 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-09-29 18:12:56 +0200 |
commit | 70ff3ad7d16bde9b4a6e91f89269bbd0a23875bf (patch) | |
tree | daf93f5747ea190b7d8ce8539d9b187932bc389c | |
parent | 231a311ecbfc2e680a4353ff6738024e52e02326 (diff) | |
parent | 859913f6d40611ff3987c6ddee7aa9427d94988c (diff) | |
download | php-git-70ff3ad7d16bde9b4a6e91f89269bbd0a23875bf.tar.gz |
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
fix tests on linux
better test cleanup
4 files changed, 23 insertions, 8 deletions
diff --git a/ext/standard/tests/streams/proc_open_bug51800.phpt b/ext/standard/tests/streams/proc_open_bug51800.phpt index 024d9cd6c6..53cafd8555 100644 --- a/ext/standard/tests/streams/proc_open_bug51800.phpt +++ b/ext/standard/tests/streams/proc_open_bug51800.phpt @@ -2,6 +2,7 @@ Bug #51800 proc_open on Windows hangs forever --SKIPIF-- <?php + echo 'skip expected to fail or take too long'; if (getenv("SKIP_SLOW_TESTS")) { die("skip slow test"); } @@ -17,7 +18,7 @@ so then the pipe buffer is emptied more often and the child has chance to contin write. The behaviour might look some better if write/read in a separate thread, however this is much more resource greedy and complexer to integrate into the user script. */ -$callee = dirname(__FILE__) . "/process" . md5(uniqid()) . ".php"; +$callee = dirname(__FILE__) . "/process_proc_open_bug51800.php"; $php = PHP_BINARY; $cmd = "$php $callee"; @@ -72,10 +73,13 @@ var_dump(array( "stderr" => $stderr, ), strlen($stdout), strlen($stderr)); -unlink($callee); - ?> ===DONE=== +--CLEAN-- +<?php +$callee = dirname(__FILE__) . "/process_proc_open_bug51800.php"; +unlink($callee); +?> --EXPECTF-- array(3) { ["status"]=> diff --git a/ext/standard/tests/streams/proc_open_bug51800_right.phpt b/ext/standard/tests/streams/proc_open_bug51800_right.phpt index bab37a8ba4..b14fed2e5d 100644 --- a/ext/standard/tests/streams/proc_open_bug51800_right.phpt +++ b/ext/standard/tests/streams/proc_open_bug51800_right.phpt @@ -2,7 +2,7 @@ Bug #51800 proc_open on Windows hangs forever, the right way to do it --FILE-- <?php -$callee = dirname(__FILE__) . "/process" . md5(uniqid()) . ".php"; +$callee = dirname(__FILE__) . "/process_proc_open_bug51800_right.php"; $php = PHP_BINARY; $cmd = "$php $callee"; @@ -56,10 +56,13 @@ var_dump(array( "stderr" => $stderr, ), strlen($stdout), strlen($stderr)); -unlink($callee); - ?> ===DONE=== +--CLEAN-- +<?php +$callee = dirname(__FILE__) . "/process_proc_open_bug51800_right.php"; +unlink($callee); +?> --EXPECTF-- array(3) { ["status"]=> diff --git a/ext/standard/tests/streams/proc_open_bug60120.phpt b/ext/standard/tests/streams/proc_open_bug60120.phpt index 978cbe62fe..8768257a2e 100644 --- a/ext/standard/tests/streams/proc_open_bug60120.phpt +++ b/ext/standard/tests/streams/proc_open_bug60120.phpt @@ -4,7 +4,11 @@ Bug #60120 proc_open hangs with stdin/out with 2048+ bytes <?php error_reporting(E_ALL); -$cmd = PHP_BINARY . ' -n -r "fwrite(STDOUT, $in = file_get_contents(\'php://stdin\')); fwrite(STDERR, $in);"'; +if (substr(PHP_OS, 0, 3) == 'WIN') { + $cmd = PHP_BINARY . ' -n -r "fwrite(STDOUT, $in = file_get_contents(\'php://stdin\')); fwrite(STDERR, $in);"'; +} else { + $cmd = PHP_BINARY . ' -n -r \'fwrite(STDOUT, $in = file_get_contents("php://stdin")); fwrite(STDERR, $in);\''; +} $descriptors = array(array('pipe', 'r'), array('pipe', 'w'), array('pipe', 'w')); $stdin = str_repeat('*', 1024 * 16) . '!'; $stdin = str_repeat('*', 2049 ); diff --git a/ext/standard/tests/streams/proc_open_bug64438.phpt b/ext/standard/tests/streams/proc_open_bug64438.phpt index e3288518d7..b3857d09d4 100644 --- a/ext/standard/tests/streams/proc_open_bug64438.phpt +++ b/ext/standard/tests/streams/proc_open_bug64438.phpt @@ -5,7 +5,11 @@ Bug #64438 proc_open hangs with stdin/out with 4097+ bytes error_reporting(E_ALL); -$cmd = PHP_BINARY . ' -n -r "fwrite(STDOUT, $in = file_get_contents(\'php://stdin\')); fwrite(STDERR, $in);"'; +if (substr(PHP_OS, 0, 3) == 'WIN') { + $cmd = PHP_BINARY . ' -n -r "fwrite(STDOUT, $in = file_get_contents(\'php://stdin\')); fwrite(STDERR, $in);"'; +} else { + $cmd = PHP_BINARY . ' -n -r \'fwrite(STDOUT, $in = file_get_contents("php://stdin")); fwrite(STDERR, $in);\''; +} $descriptors = array(array('pipe', 'r'), array('pipe', 'w'), array('pipe', 'w')); $stdin = str_repeat('*', 4097); |