eyalt Sun, 26 Dec 2010 13:10:23 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=306671
Log:
fixed 6 tests to pass on non-linux os, by removing the generic linux error
string from the exp result. on socket_strerror on the other hand, added to the
SKIPIF a condition to run on linux only, as the test checks specifically
various error strings
Changed paths:
U
php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_connect_params.phpt
U
php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_create_listen_used.phpt
U php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_getpeername.phpt
U php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_read_params.phpt
U
php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt
U php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_strerror.phpt
U php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_write_params.phpt
U
php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_connect_params.phpt
U
php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_create_listen_used.phpt
U php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_getpeername.phpt
U php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_read_params.phpt
U
php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt
U php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_strerror.phpt
U php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_write_params.phpt
U php/php-src/trunk/ext/sockets/tests/socket_connect_params.phpt
U php/php-src/trunk/ext/sockets/tests/socket_create_listen_used.phpt
U php/php-src/trunk/ext/sockets/tests/socket_getpeername.phpt
U php/php-src/trunk/ext/sockets/tests/socket_read_params.phpt
U php/php-src/trunk/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt
U php/php-src/trunk/ext/sockets/tests/socket_strerror.phpt
U php/php-src/trunk/ext/sockets/tests/socket_write_params.phpt
Modified: php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_connect_params.phpt
===================================================================
--- php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_connect_params.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_connect_params.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -30,4 +30,4 @@
Warning: socket_connect(): Socket of type AF_INET requires 3 arguments in %s on line %i
-Warning: socket_connect(): unable to connect [%i]: Transport endpoint is already connected in %s on line %i
+Warning: socket_connect(): unable to connect [%i]: %a in %s on line %i
Modified: php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_create_listen_used.phpt
===================================================================
--- php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_create_listen_used.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_create_listen_used.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -24,7 +24,7 @@
--EXPECTF--
resource(%i) of type (Socket)
-Warning: socket_create_listen(): unable to bind to given address [%i]: Address already in use in %s on line %i
+Warning: socket_create_listen(): unable to bind to given address [%i]: %a in %s on line %i
bool(false)
Warning: socket_close() expects parameter 1 to be resource, boolean given in %s on line %i
Modified: php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_getpeername.phpt
===================================================================
--- php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_getpeername.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_getpeername.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -27,7 +27,7 @@
--EXPECTF--
bool(true)
-Warning: socket_getpeername(): unable to retrieve peer name [%i]: Transport endpoint is not connected in %s on line %i
+Warning: socket_getpeername(): unable to retrieve peer name [%i]: %a in %s on line %i
bool(false)
NULL
NULL
Modified: php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_read_params.phpt
===================================================================
--- php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_read_params.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_read_params.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -25,4 +25,4 @@
Warning: socket_read() expects at least 2 parameters, 1 given in %s on line %i
-Warning: socket_read(): unable to read from socket [%i]: Transport endpoint is not connected in %s on line %i
+Warning: socket_read(): unable to read from socket [%i]: %a in %s on line %i
Modified: php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt
===================================================================
--- php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -44,7 +44,7 @@
socket_close($socket);
--EXPECTF--
-Warning: socket_recvfrom(): unable to recvfrom [%d]: Resource temporarily unavailable in %s on line %d
+Warning: socket_recvfrom(): unable to recvfrom [%d]: %a in %s on line %d
Warning: Wrong parameter count for socket_sendto() in %s on line %d
Modified: php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_strerror.phpt
===================================================================
--- php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_strerror.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_strerror.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -8,6 +8,9 @@
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
}
+ if (!stristr(PHP_OS, "linux") {
+ die('skip - test validtes linux error strings only.');
+ }
?>
--FILE--
<?php
Modified: php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_write_params.phpt
===================================================================
--- php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_write_params.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/branches/PHP_5_2/ext/sockets/tests/socket_write_params.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -25,4 +25,4 @@
Warning: socket_write() expects at least 2 parameters, 1 given in %s on line %i
-Warning: socket_write(): unable to write to socket [%i]: Broken pipe in %s on line %i
+Warning: socket_write(): unable to write to socket [%i]: %a in %s on line %i
Modified: php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_connect_params.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_connect_params.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_connect_params.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -30,4 +30,4 @@
Warning: socket_connect(): Socket of type AF_INET requires 3 arguments in %s on line %i
-Warning: socket_connect(): unable to connect [%i]: Transport endpoint is already connected in %s on line %i
+Warning: socket_connect(): unable to connect [%i]: %a in %s on line %i
Modified: php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_create_listen_used.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_create_listen_used.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_create_listen_used.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -24,7 +24,7 @@
--EXPECTF--
resource(%i) of type (Socket)
-Warning: socket_create_listen(): unable to bind to given address [%i]: Address already in use in %s on line %i
+Warning: socket_create_listen(): unable to bind to given address [%i]: %a in %s on line %i
bool(false)
Warning: socket_close() expects parameter 1 to be resource, boolean given in %s on line %i
Modified: php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_getpeername.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_getpeername.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_getpeername.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -27,7 +27,7 @@
--EXPECTF--
bool(true)
-Warning: socket_getpeername(): unable to retrieve peer name [%i]: Transport endpoint is not connected in %s on line %i
+Warning: socket_getpeername(): unable to retrieve peer name [%i]: %a in %s on line %i
bool(false)
NULL
NULL
Modified: php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_read_params.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_read_params.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_read_params.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -25,4 +25,4 @@
Warning: socket_read() expects at least 2 parameters, 1 given in %s on line %i
-Warning: socket_read(): unable to read from socket [%i]: Transport endpoint is not connected in %s on line %i
+Warning: socket_read(): unable to read from socket [%i]: %a in %s on line %i
Modified: php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -44,7 +44,7 @@
socket_close($socket);
--EXPECTF--
-Warning: socket_recvfrom(): unable to recvfrom [%d]: Resource temporarily unavailable in %s on line %d
+Warning: socket_recvfrom(): unable to recvfrom [%d]: %a in %s on line %d
Warning: Wrong parameter count for socket_sendto() in %s on line %d
Modified: php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_strerror.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_strerror.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_strerror.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -8,6 +8,9 @@
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
}
+ if (!stristr(PHP_OS, "linux") {
+ die('skip - test validtes linux error strings only.');
+ }
?>
--FILE--
<?php
Modified: php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_write_params.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_write_params.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_write_params.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -25,4 +25,4 @@
Warning: socket_write() expects at least 2 parameters, 1 given in %s on line %i
-Warning: socket_write(): unable to write to socket [%i]: Broken pipe in %s on line %i
+Warning: socket_write(): unable to write to socket [%i]: %a in %s on line %i
Modified: php/php-src/trunk/ext/sockets/tests/socket_connect_params.phpt
===================================================================
--- php/php-src/trunk/ext/sockets/tests/socket_connect_params.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/trunk/ext/sockets/tests/socket_connect_params.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -30,4 +30,4 @@
Warning: socket_connect(): Socket of type AF_INET requires 3 arguments in %s on line %i
-Warning: socket_connect(): unable to connect [%i]: Transport endpoint is already connected in %s on line %i
+Warning: socket_connect(): unable to connect [%i]: %a in %s on line %i
Modified: php/php-src/trunk/ext/sockets/tests/socket_create_listen_used.phpt
===================================================================
--- php/php-src/trunk/ext/sockets/tests/socket_create_listen_used.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/trunk/ext/sockets/tests/socket_create_listen_used.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -24,7 +24,7 @@
--EXPECTF--
resource(%i) of type (Socket)
-Warning: socket_create_listen(): unable to bind to given address [%i]: Address already in use in %s on line %i
+Warning: socket_create_listen(): unable to bind to given address [%i]: %a in %s on line %i
bool(false)
Warning: socket_close() expects parameter 1 to be resource, boolean given in %s on line %i
Modified: php/php-src/trunk/ext/sockets/tests/socket_getpeername.phpt
===================================================================
--- php/php-src/trunk/ext/sockets/tests/socket_getpeername.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/trunk/ext/sockets/tests/socket_getpeername.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -27,7 +27,7 @@
--EXPECTF--
bool(true)
-Warning: socket_getpeername(): unable to retrieve peer name [%i]: Transport endpoint is not connected in %s on line %i
+Warning: socket_getpeername(): unable to retrieve peer name [%i]: %a in %s on line %i
bool(false)
NULL
NULL
Modified: php/php-src/trunk/ext/sockets/tests/socket_read_params.phpt
===================================================================
--- php/php-src/trunk/ext/sockets/tests/socket_read_params.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/trunk/ext/sockets/tests/socket_read_params.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -25,4 +25,4 @@
Warning: socket_read() expects at least 2 parameters, 1 given in %s on line %i
-Warning: socket_read(): unable to read from socket [%i]: Transport endpoint is not connected in %s on line %i
+Warning: socket_read(): unable to read from socket [%i]: %a in %s on line %i
Modified: php/php-src/trunk/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt
===================================================================
--- php/php-src/trunk/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/trunk/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -44,7 +44,7 @@
socket_close($socket);
--EXPECTF--
-Warning: socket_recvfrom(): unable to recvfrom [%d]: Resource temporarily unavailable in %s on line %d
+Warning: socket_recvfrom(): unable to recvfrom [%d]: %a in %s on line %d
Warning: Wrong parameter count for socket_sendto() in %s on line %d
Modified: php/php-src/trunk/ext/sockets/tests/socket_strerror.phpt
===================================================================
--- php/php-src/trunk/ext/sockets/tests/socket_strerror.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/trunk/ext/sockets/tests/socket_strerror.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -8,6 +8,9 @@
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
}
+ if (!stristr(PHP_OS, "linux") {
+ die('skip - test validtes linux error strings only.');
+ }
?>
--FILE--
<?php
Modified: php/php-src/trunk/ext/sockets/tests/socket_write_params.phpt
===================================================================
--- php/php-src/trunk/ext/sockets/tests/socket_write_params.phpt 2010-12-26 12:37:18 UTC (rev 306670)
+++ php/php-src/trunk/ext/sockets/tests/socket_write_params.phpt 2010-12-26 13:10:23 UTC (rev 306671)
@@ -25,4 +25,4 @@
Warning: socket_write() expects at least 2 parameters, 1 given in %s on line %i
-Warning: socket_write(): unable to write to socket [%i]: Broken pipe in %s on line %i
+Warning: socket_write(): unable to write to socket [%i]: %a in %s on line %i
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php