Commit: e5d0dc24d268cbf2aabdb9e48135385f01b21765 Author: Xinchen Hui <larue...@php.net> Tue, 5 Mar 2013 16:56:00 +0800 Parents: 1978dae3095d6f02cbcb964142802fd0f3a7ee16 Branches: PHP-5.5
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e5d0dc24d268cbf2aabdb9e48135385f01b21765 Log: Fix tests temporary seems IPV6_PKTINFO are not avaiable in some OS Changed paths: M ext/sockets/tests/socket_recvmsg.phpt M ext/sockets/tests/socket_sendrecvmsg_multi_msg.phpt M ext/sockets/tests/socket_set_option_in6_pktinfo.phpt Diff: diff --git a/ext/sockets/tests/socket_recvmsg.phpt b/ext/sockets/tests/socket_recvmsg.phpt index 30263a4..cbdb528 100644 --- a/ext/sockets/tests/socket_recvmsg.phpt +++ b/ext/sockets/tests/socket_recvmsg.phpt @@ -3,10 +3,13 @@ recvmsg(): basic test --SKIPIF-- <?php if (!extension_loaded('sockets')) { -die('skip sockets extension not available.'); + die('skip sockets extension not available.'); } if (!defined('IPPROTO_IPV6')) { -die('skip IPv6 not available.'); + die('skip IPv6 not available.'); +} +if (!defined('IPV6_RECVPKTINFO')) { + die('skip IPV6_RECVPKTINFO not available.'); } --FILE-- diff --git a/ext/sockets/tests/socket_sendrecvmsg_multi_msg.phpt b/ext/sockets/tests/socket_sendrecvmsg_multi_msg.phpt index 212f7e1..44e25f0 100644 --- a/ext/sockets/tests/socket_sendrecvmsg_multi_msg.phpt +++ b/ext/sockets/tests/socket_sendrecvmsg_multi_msg.phpt @@ -6,12 +6,16 @@ if (!extension_loaded('sockets')) die('skip sockets extension not available.'); if (!defined('IPPROTO_IPV6')) die('skip IPv6 not available.'); -if (substr(PHP_OS, 0, 3) == 'WIN') +if (substr(PHP_OS, 0, 3) == 'WIN') die('skip Not for the Windows!'); /* 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 */ +if (!defined('IPV6_RECVPKTINFO')) { + die('skip IPV6_RECVPKTINFO not available.'); +} + --FILE-- <?php include __DIR__."/mcast_helpers.php.inc"; diff --git a/ext/sockets/tests/socket_set_option_in6_pktinfo.phpt b/ext/sockets/tests/socket_set_option_in6_pktinfo.phpt index 27b6ae5..aa6d5ae 100644 --- a/ext/sockets/tests/socket_set_option_in6_pktinfo.phpt +++ b/ext/sockets/tests/socket_set_option_in6_pktinfo.phpt @@ -3,13 +3,17 @@ socket_set_option() with IPV6_PKTINFO --SKIPIF-- <?php if (!extension_loaded('sockets')) { -die('skip sockets extension not available.'); + die('skip sockets extension not available.'); } if (!defined('IPPROTO_IPV6')) { -die('skip IPv6 not available.'); + die('skip IPv6 not available.'); } -if (substr(PHP_OS, 0, 3) == 'WIN') - die('skip Not for Windows!'); +if (substr(PHP_OS, 0, 3) == 'WIN') { + die('skip Not for Windows!'); +} +if (!defined('IPV6_PKTINFO')) { + die('skip IPV6_PKTINFO not available.'); +} --FILE-- <?php @@ -29,4 +33,3 @@ var_dump(socket_set_option($s, IPPROTO_IPV6, IPV6_PKTINFO, [ Warning: socket_set_option(): error converting user data (path: in6_pktinfo): The key 'addr' is required in %s on line %d bool(false) bool(true) - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php