com php-src: fix flaky posix test: ext/posix/tests/posix_errn o_variation2.phpt
| From: | Joe Watkins | Date: | Wed, 05 Jun 2019 14:34:50 +0000 |
| Subject: | com php-src: fix flaky posix test: ext/posix/tests/posix_errn o_variation2.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106570@lists.php.net to get a copy of this message | ||
Commit: f4474e57244dfcc52f278227fd9f03fd84f04167
Author: Joe Watkins <krakjoe@php.net> Wed, 5 Jun 2019 16:34:50 +0200
Parents: a3e6b50442db106d354931ecaa0284a200609be6
Branches: PHP-7.2 PHP-7.3 PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f4474e57244dfcc52f278227fd9f03fd84f04167
Log:
fix flaky posix test
Changed paths:
M ext/posix/tests/posix_errno_variation2.phpt
Diff:
diff --git a/ext/posix/tests/posix_errno_variation2.phpt
b/ext/posix/tests/posix_errno_variation2.phpt
index 23dc910..52d076c 100644
--- a/ext/posix/tests/posix_errno_variation2.phpt
+++ b/ext/posix/tests/posix_errno_variation2.phpt
@@ -7,23 +7,14 @@ Francesco Fullone ff@ideato.it
--SKIPIF--
<?php
if(!extension_loaded("posix")) print "skip - POSIX extension not
loaded";
- if(!extension_loaded("pcntl")) print "skip - PCNTL extension required";
?>
--FILE--
<?php
-
echo "*** Test by calling function with pid error ***\n";
-$pid = 10000;
-
-do {
- $pid += 1;
- $result = shell_exec("ps -p " . $pid);
-} while (strstr($pid, $result));
+posix_kill((2 ** 22) + 1, SIGKILL);
-posix_kill($pid, SIGKILL);
var_dump(posix_errno());
-
?>
--EXPECTF--
*** Test by calling function with pid error ***