mirror of
https://github.com/php/php-src.git
synced 2026-04-03 22:22:18 +02:00
Merge branch 'PHP-5.6'
* PHP-5.6: fix tests on linux better test cleanup
This commit is contained in:
@@ -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"]=>
|
||||
|
||||
@@ -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"]=>
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user