diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-06-05 11:55:57 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-06-05 11:58:11 +0200 |
commit | 528aa7932a839fc6319979c34aa372805d8dc41c (patch) | |
tree | 2b3734c54ea2dd1bff58050a96a3199eb123ec6c | |
parent | a0ce1df024c3351f9859215356268a85ae94c2f7 (diff) | |
download | php-git-528aa7932a839fc6319979c34aa372805d8dc41c.tar.gz |
Use zero port in socket_(export|import)_stream-5.phpt
These regularly fail due to port clashes, though we don't seem to
use those ports in any other tests.
As we don't care about the specific port that is used here, pass
zero so that a random ephemeral port is used.
-rw-r--r-- | ext/sockets/tests/socket_export_stream-5.phpt | 4 | ||||
-rw-r--r-- | ext/sockets/tests/socket_import_stream-5.phpt | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/sockets/tests/socket_export_stream-5.phpt b/ext/sockets/tests/socket_export_stream-5.phpt index 413ce24f3e..5a1d03fa6e 100644 --- a/ext/sockets/tests/socket_export_stream-5.phpt +++ b/ext/sockets/tests/socket_export_stream-5.phpt @@ -11,12 +11,12 @@ if (!function_exists('zend_leak_variable')) <?php $sock0 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); -socket_bind($sock0, '0.0.0.0', 58385); +socket_bind($sock0, '0.0.0.0', 0); $stream0 = socket_export_stream($sock0); zend_leak_variable($stream0); $sock1 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); -socket_bind($sock1, '0.0.0.0', 58386); +socket_bind($sock1, '0.0.0.0', 0); $stream1 = socket_export_stream($sock1); zend_leak_variable($sock1); diff --git a/ext/sockets/tests/socket_import_stream-5.phpt b/ext/sockets/tests/socket_import_stream-5.phpt index f583897d3e..b3fbadc054 100644 --- a/ext/sockets/tests/socket_import_stream-5.phpt +++ b/ext/sockets/tests/socket_import_stream-5.phpt @@ -10,11 +10,11 @@ if (!function_exists('zend_leak_variable')) --FILE-- <?php -$stream0 = stream_socket_server("udp://0.0.0.0:58394", $errno, $errstr, STREAM_SERVER_BIND); +$stream0 = stream_socket_server("udp://0.0.0.0:0", $errno, $errstr, STREAM_SERVER_BIND); $sock0 = socket_import_stream($stream0); zend_leak_variable($stream0); -$stream1 = stream_socket_server("udp://0.0.0.0:58395", $errno, $errstr, STREAM_SERVER_BIND); +$stream1 = stream_socket_server("udp://0.0.0.0:0", $errno, $errstr, STREAM_SERVER_BIND); $sock1 = socket_import_stream($stream1); zend_leak_variable($sock1); |