Skip to content

Commit 47df3f9

Browse files
committed
Unblock tests under ASan on Windows
These tests execute php.exe without passing the PATH, what might be a more general issues, but at least with ASan enabled, the required DLLs could usually not be found, resulting in the tests stalling.
1 parent 9b15799 commit 47df3f9

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

ext/standard/tests/file/bug72035.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $cmd = "$cgi -n -C $fl";
2121

2222
/* Need to run CGI with the env reset. */
2323
$desc = array(0 => array("pipe", "r"));
24-
$proc = proc_open($cmd, $desc, $pipes, getcwd(), array());
24+
$proc = proc_open($cmd, $desc, $pipes, getcwd(), array('PATH' => getenv('PATH')));
2525
if (is_resource($proc)) {
2626
echo stream_get_contents($pipes[0]);
2727

ext/standard/tests/file/proc_open01.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if ($php === false) {
1111
$proc = proc_open(
1212
"$php -n",
1313
array(0 => array('pipe', 'r'), 1 => array('pipe', 'w')),
14-
$pipes, getcwd(), array(), array()
14+
$pipes, getcwd(), array('PATH' => getenv('PATH')), array()
1515
);
1616
if ($proc === false) {
1717
print "something went wrong.\n";

ext/standard/tests/general_functions/proc_open_array.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ fpassthru($pipes[1]);
4444
proc_close($proc);
4545

4646
putenv('ENV_1=ENV_1');
47-
$env = ['ENV_2' => 'ENV_2'];
47+
$env = ['ENV_2' => 'ENV_2', 'PATH' => getenv('PATH')];
4848
$cmd = [$php, '-n', '-r', 'var_dump(getenv("ENV_1"), getenv("ENV_2"));'];
4949

5050
echo "\nEnvironment inheritance:\n";

ext/standard/tests/streams/proc_open_bug60120.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ $process = proc_open(
3030
],
3131
$pipes,
3232
getcwd(),
33-
[],
33+
['PATH' => getenv('PATH')],
3434
[
3535
'suppress_errors' => true,
3636
'bypass_shell' => false

ext/standard/tests/streams/proc_open_bug64438.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ $descriptors = array(array('pipe', 'r'), array('pipe', 'w'), array('pipe', 'w'))
1414
$stdin = str_repeat('*', 4097);
1515

1616
$options = array_merge(array('suppress_errors' => true, 'bypass_shell' => false));
17-
$process = proc_open($cmd, $descriptors, $pipes, getcwd(), array(), $options);
17+
$process = proc_open($cmd, $descriptors, $pipes, getcwd(), array('PATH' => getenv('PATH')), $options);
1818

1919
foreach ($pipes as $pipe) {
2020
stream_set_blocking($pipe, false);

0 commit comments

Comments
 (0)