mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
MFH: Fix skipif
This commit is contained in:
parent
73553e8c77
commit
808acd6b64
8
ext/sockets/tests/ipv6_skipif.inc
Normal file
8
ext/sockets/tests/ipv6_skipif.inc
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
if (!defined("AF_INET6")) {
|
||||
die('skip no IPv6 support');
|
||||
}
|
||||
/* If IPv6 is supported on the platform this will error out with code 111 - Connection refused.
|
||||
If IPv6 is NOT supported, $errno will be set to something else (indicating parse/getaddrinfo error) */
|
||||
@stream_socket_client('tcp://[::1]:0', $errno);
|
||||
if ($errno != 111) die('skip no IPv6 support');
|
@ -5,9 +5,7 @@ IPv6 Loopback test
|
||||
if (!extension_loaded('sockets')) {
|
||||
die('skip sockets extension not available.');
|
||||
}
|
||||
if (!defined("AF_INET6")) {
|
||||
die('skip no IPv6 support');
|
||||
}
|
||||
require 'ipv6_skipif.inc';
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
@ -5,6 +5,7 @@ Test if socket_recvfrom() receives data sent by socket_sendto() via IPv6 UDP
|
||||
if (!extension_loaded('sockets')) {
|
||||
die('SKIP The sockets extension is not loaded.');
|
||||
}
|
||||
require 'ipv6_skipif.inc';
|
||||
--FILE--
|
||||
<?php
|
||||
$socket = socket_create(AF_INET6, SOCK_DGRAM, SOL_UDP);
|
||||
|
Loading…
Reference in New Issue
Block a user