]> granicus.if.org Git - php/commitdiff
explicitly ignore php.ini for proc open tests
authorAnatol Belski <ab@php.net>
Tue, 21 Mar 2017 11:39:40 +0000 (12:39 +0100)
committerAnatol Belski <ab@php.net>
Tue, 21 Mar 2017 11:39:40 +0000 (12:39 +0100)
In some cases, when an environment is unclean, tests might get stuck fe
when some incorrect ini file is loaded. As the test depends on the core
only, it is safer to explicitly ignore the ini. Any ini can be passed in
the cmd itself, if needed.

ext/standard/tests/general_functions/proc_open_pipes1.phpt
ext/standard/tests/general_functions/proc_open_pipes2.phpt
ext/standard/tests/general_functions/proc_open_pipes3.phpt
ext/standard/tests/streams/proc_open_bug51800_right.phpt
ext/standard/tests/streams/proc_open_bug51800_right2.phpt
ext/standard/tests/streams/proc_open_bug69900.phpt

index f6472e2f9984d14624d15d5e04315e8f9bed511c..dc104283eb1e819065f4a60fa37620e9de495f6c 100644 (file)
@@ -11,7 +11,7 @@ for ($i = 3; $i<= 30; $i++) {
 
 $php = getenv("TEST_PHP_EXECUTABLE");
 $callee = create_sleep_script();
-proc_open("$php $callee", $spec, $pipes);
+proc_open("$php -n $callee", $spec, $pipes);
 
 var_dump(count($spec));
 var_dump($pipes);
index b07a19e143b73247b990937e1af13e31e63e2977..a232d53dd7bb6e271ddd3ae3216266aac9dbc6e5 100644 (file)
@@ -9,7 +9,7 @@ $spec = array();
 
 $php = getenv("TEST_PHP_EXECUTABLE");
 $callee = create_sleep_script();
-proc_open("$php $callee", $spec, $pipes);
+proc_open("$php -n $callee", $spec, $pipes);
 
 var_dump(count($spec));
 var_dump($pipes);
index 2ddcd276d78a53376ddd0288ed43527431bcb5e9..6e90471bdc1e51c4edc2b15b48644c5ab7ab3ec5 100644 (file)
@@ -13,17 +13,17 @@ $php = getenv("TEST_PHP_EXECUTABLE");
 $callee = create_sleep_script();
 
 $spec[$i] = array('pi');
-proc_open("$php $callee", $spec, $pipes);
+proc_open("$php -n $callee", $spec, $pipes);
 
 $spec[$i] = 1;
-proc_open("$php $callee", $spec, $pipes);
+proc_open("$php -n $callee", $spec, $pipes);
 
 $spec[$i] = array('pipe', "test");
-proc_open("$php $callee", $spec, $pipes);
+proc_open("$php -n $callee", $spec, $pipes);
 var_dump($pipes);
 
 $spec[$i] = array('file', "test", "z");
-proc_open("$php $callee", $spec, $pipes);
+proc_open("$php -n $callee", $spec, $pipes);
 var_dump($pipes);
 
 echo "END\n";
index b14fed2e5dfb026e93494e87816cef8df1906f70..efff8e711017daa6467823824314750b6a1b6427 100644 (file)
@@ -4,7 +4,7 @@ Bug #51800 proc_open on Windows hangs forever, the right way to do it
 <?php
 $callee = dirname(__FILE__) . "/process_proc_open_bug51800_right.php";
 $php = PHP_BINARY;
-$cmd = "$php $callee";
+$cmd = "$php -n $callee";
 
 $status;
 $stdout = "";
index 1e742745c1e104dcb6ef6d8100dfca7cbc316aea..8e7c7df2c9708200e60d15d70bfd805f895d1aac 100644 (file)
@@ -4,7 +4,7 @@ Bug #51800 proc_open on Windows hangs forever, the right way to do it with more
 <?php
 $callee = dirname(__FILE__) . "/process_proc_open_bug51800_right2.php";
 $php = PHP_BINARY;
-$cmd = "$php $callee";
+$cmd = "$php -n $callee";
 
 $status;
 $stdout = "";
index c98fd97eb4da639d1b353a9e8e2b48378821d007..86e323eb0574ebca884542c38be37ae104ecc366 100644 (file)
@@ -22,7 +22,7 @@ file_put_contents($fl, $test_content);
 $descriptorspec = array(0 => array("pipe", "r"),1 => array("pipe", "w"));
 $pipes = array();
 
-$process = proc_open(PHP_BINARY.' -f ' . $fl, $descriptorspec, $pipes, NULL, NULL, array("blocking_pipes" => true));
+$process = proc_open(PHP_BINARY.' -n -f ' . $fl, $descriptorspec, $pipes, NULL, NULL, array("blocking_pipes" => true));
 
 for($i = 0; $i < 10; $i++){
        fwrite($pipes[0], "hello$i\r\n");