diff options
4 files changed, 14 insertions, 3 deletions
diff --git a/ext/pcntl/tests/pcntl_setpriority_basic.phpt b/ext/pcntl/tests/pcntl_setpriority_basic.phpt index 235b0ec9ce..0c92245e1e 100644 --- a/ext/pcntl/tests/pcntl_setpriority_basic.phpt +++ b/ext/pcntl/tests/pcntl_setpriority_basic.phpt @@ -11,8 +11,8 @@ if (!extension_loaded('pcntl')) { if (!function_exists('pcntl_setpriority')) { die('skip pcntl_setpriority doesn\'t exist'); } -if (!function_exists('posix_getuid') || posix_getuid() !== 0) { - die('skip this functions needs to run with superuser'); +if (@pcntl_setpriority(-5) === false && pcntl_get_last_error() == PCNTL_EACCES) { + die('skip this function needs to run with CAP_SYS_NICE privileges'); } ?> --FILE-- diff --git a/ext/sockets/tests/socket_addrinfo_explain.phpt b/ext/sockets/tests/socket_addrinfo_explain.phpt index 1e8962d2bd..ebc60afa51 100644 --- a/ext/sockets/tests/socket_addrinfo_explain.phpt +++ b/ext/sockets/tests/socket_addrinfo_explain.phpt @@ -10,11 +10,12 @@ if (!extension_loaded('sockets')) { $addrinfo = socket_addrinfo_lookup('127.0.0.1', 2000, array( 'ai_family' => AF_INET, 'ai_socktype' => SOCK_DGRAM, + 'ai_flags' => AI_CANONNAME, )); var_dump(socket_addrinfo_explain($addrinfo[0])); echo "Done"; --EXPECTF-- -array(5) { +array(6) { ["ai_flags"]=> int(%d) ["ai_family"]=> @@ -23,6 +24,8 @@ array(5) { int(2) ["ai_protocol"]=> int(%d) + ["ai_canonname"]=> + string(9) "127.0.0.1" ["ai_addr"]=> array(2) { ["sin_port"]=> diff --git a/ext/sockets/tests/socket_sendrecvmsg_multi_msg.phpt b/ext/sockets/tests/socket_sendrecvmsg_multi_msg.phpt index b4ba00debe..9e004afa22 100644 --- a/ext/sockets/tests/socket_sendrecvmsg_multi_msg.phpt +++ b/ext/sockets/tests/socket_sendrecvmsg_multi_msg.phpt @@ -4,12 +4,16 @@ sendmsg()/recvmsg(): test ability to receive multiple messages (WIN32) <?php if (!extension_loaded('sockets')) die('skip sockets extension not available.'); + +require 'ipv6_skipif.inc'; + if (!defined('IPPROTO_IPV6')) die('skip IPv6 not available.'); /* Windows supports IPV6_RECVTCLASS and is able to receive the tclass via * WSARecvMsg (though only the top 6 bits seem to reported), but WSASendMsg * does not accept IPV6_TCLASS messages. We still test that sendmsg() works * correctly by sending an IPV6_PKTINFO message that will have no effect */ +?> --FILE-- <?php include __DIR__."/mcast_helpers.php.inc"; diff --git a/ext/standard/tests/general_functions/proc_nice_basic.phpt b/ext/standard/tests/general_functions/proc_nice_basic.phpt index 687152ee10..b8cc3cd128 100644 --- a/ext/standard/tests/general_functions/proc_nice_basic.phpt +++ b/ext/standard/tests/general_functions/proc_nice_basic.phpt @@ -9,6 +9,10 @@ Simone Gentili (sensorario@gmail.com) <?php if(!function_exists('proc_nice')) die("skip. proc_nice not available "); if(substr(strtoupper(PHP_OS), 0, 3) == 'WIN') die('skip. not for Windows'); +exec('ps -p 1 -o "pid,nice"', $output, $exit_code); +if ($exit_code !== 0) { + die("skip ps -p is not available"); +} ?> --FILE-- <?php |
