Skip to content

Commit 91d3cd8

Browse files
committed
better test cleanup
and even force the XFAIL to fail as it would take too long anyway, even if it passes
1 parent 46aa2c3 commit 91d3cd8

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

ext/standard/tests/streams/proc_open_bug51800.phpt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Bug #51800 proc_open on Windows hangs forever
33
--SKIPIF--
44
<?php
5+
echo 'skip expected to fail or take too long';
56
if (getenv("SKIP_SLOW_TESTS")) {
67
die("skip slow test");
78
}
@@ -17,7 +18,7 @@ so then the pipe buffer is emptied more often and the child has chance to contin
1718
write. The behaviour might look some better if write/read in a separate thread, however
1819
this is much more resource greedy and complexer to integrate into the user script. */
1920

20-
$callee = dirname(__FILE__) . "/process" . md5(uniqid()) . ".php";
21+
$callee = dirname(__FILE__) . "/process_proc_open_bug51800.php";
2122
$php = PHP_BINARY;
2223
$cmd = "$php $callee";
2324

@@ -72,10 +73,13 @@ var_dump(array(
7273
"stderr" => $stderr,
7374
), strlen($stdout), strlen($stderr));
7475

75-
unlink($callee);
76-
7776
?>
7877
===DONE===
78+
--CLEAN--
79+
<?php
80+
$callee = dirname(__FILE__) . "/process_proc_open_bug51800.php";
81+
unlink($callee);
82+
?>
7983
--EXPECTF--
8084
array(3) {
8185
["status"]=>

ext/standard/tests/streams/proc_open_bug51800_right.phpt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Bug #51800 proc_open on Windows hangs forever, the right way to do it
33
--FILE--
44
<?php
5-
$callee = dirname(__FILE__) . "/process" . md5(uniqid()) . ".php";
5+
$callee = dirname(__FILE__) . "/process_proc_open_bug51800_right.php";
66
$php = PHP_BINARY;
77
$cmd = "$php $callee";
88

@@ -56,10 +56,13 @@ var_dump(array(
5656
"stderr" => $stderr,
5757
), strlen($stdout), strlen($stderr));
5858

59-
unlink($callee);
60-
6159
?>
6260
===DONE===
61+
--CLEAN--
62+
<?php
63+
$callee = dirname(__FILE__) . "/process_proc_open_bug51800_right.php";
64+
unlink($callee);
65+
?>
6366
--EXPECTF--
6467
array(3) {
6568
["status"]=>

0 commit comments

Comments
 (0)