]> granicus.if.org Git - php/commitdiff
fix flaky posix test
authorJoe Watkins <krakjoe@php.net>
Wed, 5 Jun 2019 14:34:50 +0000 (16:34 +0200)
committerJoe Watkins <krakjoe@php.net>
Wed, 5 Jun 2019 14:34:50 +0000 (16:34 +0200)
ext/posix/tests/posix_errno_variation2.phpt

index 23dc910b9a5c25bee8ef4128c70a9bd9fc5dde34..52d076cc63cfb718fd056770a39848a4bafc66f6 100644 (file)
@@ -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 ***