mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Make these socket tests less Linux-specific
This commit is contained in:
parent
ecb9a94472
commit
a2c564b9e6
6 changed files with 13 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
|||
--TEST--
|
||||
Test if socket binds on 31337
|
||||
Test if socket binds on 31338
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('sockets')) {
|
||||
|
@ -7,12 +7,12 @@ if (!extension_loaded('sockets')) {
|
|||
}
|
||||
--FILE--
|
||||
<?php
|
||||
$sock = socket_create_listen(31337);
|
||||
$sock = socket_create_listen(31338);
|
||||
socket_getsockname($sock, $addr, $port);
|
||||
var_dump($addr, $port);
|
||||
--EXPECT--
|
||||
string(7) "0.0.0.0"
|
||||
int(31337)
|
||||
int(31338)
|
||||
--CREDITS--
|
||||
Till Klampaeckel, till@php.net
|
||||
PHP Testfest Berlin 2009-05-09
|
||||
|
|
|
@ -24,17 +24,17 @@ NULL
|
|||
Warning: socket_create_pair() expects parameter 1 to be long, %unicode_string_optional% given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: socket_create_pair(): unable to create socket pair [94]: Socket type not supported in %s on line %d
|
||||
Warning: socket_create_pair(): unable to create socket pair [%d]: %s not supported in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: socket_create_pair(): invalid socket domain [31337] specified for argument 1, assuming AF_INET in %s on line %d
|
||||
|
||||
Warning: socket_create_pair(): unable to create socket pair [94]: Socket type not supported in %s on line %d
|
||||
Warning: socket_create_pair(): unable to create socket pair [%d]: %s not supported in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: socket_create_pair(): invalid socket type [31337] specified for argument 2, assuming SOCK_STREAM in %s on line %d
|
||||
|
||||
Warning: socket_create_pair(): unable to create socket pair [95]: Operation not supported in %s on line %d
|
||||
Warning: socket_create_pair(): unable to create socket pair [%d]: %s not supported %s on line %d
|
||||
bool(false)
|
||||
--CREDITS--
|
||||
Till Klampaeckel, till@php.net
|
||||
|
|
|
@ -44,7 +44,7 @@ if (!extension_loaded('sockets')) {
|
|||
|
||||
socket_close($socket);
|
||||
--EXPECTF--
|
||||
Warning: socket_recvfrom(): unable to recvfrom [11]: Resource temporarily unavailable in %s on line %d
|
||||
Warning: socket_recvfrom(): unable to recvfrom [%d]: Resource temporarily unavailable in %s on line %d
|
||||
|
||||
Warning: Wrong parameter count for socket_sendto() in %s on line %d
|
||||
|
||||
|
|
|
@ -49,9 +49,9 @@ if (!extension_loaded('sockets')) {
|
|||
@unlink($address);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: socket_create(): Unable to create socket [93]: Protocol not supported in %s on line %d
|
||||
Warning: socket_create(): Unable to create socket [%d]: Protocol not supported in %s on line %d
|
||||
|
||||
Warning: socket_recvfrom(): unable to recvfrom [11]: Resource temporarily unavailable in %s on line %d
|
||||
Warning: socket_recvfrom(): unable to recvfrom [%d]: Resource temporarily unavailable in %s on line %d
|
||||
|
||||
Warning: socket_sendto() expects at least 5 parameters, 4 given in %s on line %d
|
||||
bool(false)
|
||||
|
|
|
@ -9,11 +9,11 @@ if (!extension_loaded('sockets')) {
|
|||
--FILE--
|
||||
<?php
|
||||
|
||||
$socket = socket_create_listen(31337);
|
||||
$socket = socket_create_listen(31339);
|
||||
var_dump(socket_set_block($socket));
|
||||
socket_close($socket);
|
||||
|
||||
$socket2 = socket_create_listen(31338);
|
||||
$socket2 = socket_create_listen(31340);
|
||||
socket_close($socket2);
|
||||
var_dump(socket_set_block($socket2));
|
||||
|
||||
|
|
|
@ -9,11 +9,11 @@ if (!extension_loaded('sockets')) {
|
|||
--FILE--
|
||||
<?php
|
||||
|
||||
$socket = socket_create_listen(31337);
|
||||
$socket = socket_create_listen(31339);
|
||||
var_dump(socket_set_nonblock($socket));
|
||||
socket_close($socket);
|
||||
|
||||
$socket2 = socket_create_listen(31338);
|
||||
$socket2 = socket_create_listen(31340);
|
||||
socket_close($socket2);
|
||||
var_dump(socket_set_nonblock($socket2));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue