summaryrefslogtreecommitdiff
path: root/test/socket
AgeCommit message (Collapse)Author
2013-01-31* ext/socket/raddrinfo.c (rsock_unix_sockaddr_len): returnshugo
sizeof(sa_familiy_t) if path is empty. see "Autobind Feature" in unix(7) for details. * ext/socket/lib/socket.rb (unix_socket_abstract_name?): treat an empty path as an abstract name. * test/socket/test_unix.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-30* ext/socket/unixsocket.c (rsock_init_unixsock): use rb_inspect()shugo
because rb_sys_fail_str() fails if its argument contains NUL. * test/socket/test_unix.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-29* ext/socket/socket.c (sock_s_pack_sockaddr_un): calculate theshugo
correct address length of an abstract socket. * test/socket/test_unix.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-25* ext/socket/raddrinfo.c (rsock_unixpath_len, init_unix_addrinfo),shugo
ext/socket/unixsocket.c (unixsock_connect_internal, rsock_init_unixsock): calculate the correct address length of an abstract socket. Without this fix, sizeof(struct sockaddr_un) is specified as the length of an abstract socket for bind(2) or connect(2), so the address of the socket is filled with extra NUL characters. See unix(7) for details. * ext/socket/lib/socket.rb (unix_server_socket): don't access the file system if the platform is Linux and path starts with NUL, which means that the socket is an abstract socket. * test/socket/test_unix.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-30Check if there is no error before reconnect [Bug #4387]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-26Revert "Darwin 12 (OS X Mountain Lion) also has Bug #6692"naruse
This reverts commit r37033. darwin12 seems to use an address started with fe80. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-26Darwin 12 (OS X Mountain Lion) also has Bug #6692naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-24Show nd6 options and whether the packet is reached to the server or not.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-24Add version check for darwin's bug.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-20* test/socket/test_socket.rb: Ignore IPv6 unique local addresses on OSdrbrain
X (iCloud Back to my Mac addresses) for test_udp_socket since they do not act as loopback addresses. [Bug #6692] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-20* ext/socket/raddrinfo.c (addrinfo_ipv6_unique_local_p): Addeddrbrain
Addrinfo#ipv6_unique_local? to detect RFC 4193 unique local addresses. Part of #6692 * ext/socket/rubysocket.h: Add IN6_IS_ADDR_UNIQUE_LOCAL macro if missing. * test/socket/test_addrinfo.rb: Test for ipv6_unqiue_local? git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-14Check IFDISABLED on Mac OS X.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-10fix the path of ifconfig.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-10skip addresses whose interface is set as POINTOPOINT.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-10Skip IPv6 addresses whose interface is set as IFDISABLED.naruse
FreeBSD 9.0 with default setting (ipv6_activate_all_interfaces is not YES) sets IFDISABLED to interfaces which don't have global IPv6 address. Link-local IPv6 addresses on those interfaces don't work. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-26* ext/socket/raddrinfo.c (init_unix_addrinfo): support the longestakr
path in sockaddr_un. (inspect_sockaddr): ditto. (addrinfo_mdump): ditto. (addrinfo_mload): ditto. (rsock_unixpath_str): new function. (rsock_unixpath): removed. (rsock_unixaddr): use rsock_unixpath_str. * ext/socket/socket.c (sock_s_pack_sockaddr_un): support the longest path in sockaddr_un. (sock_s_unpack_sockaddr_un): ditto. (sock_s_gethostbyaddr): unused variable removed. * ext/socket/unixsocket.c (rsock_init_unixsock): support the longest path in sockaddr_un. * ext/socket/rubysocket.h (rsock_unixpath_str): declared. (rsock_unixpath): removed. * test/socket/test_unix.rb: comment out test_nul because abstract unix sockets may contain NULs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23* test/socket/test_unix.rb (bound_unix_socket): make temporaryakr
filename shorter for less possibility of Unix socket path over 107 bytes when TMPDIR has long path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-09* ext/socket/lib/socket.rb (family_addrinfo): return the givenakr
addrinfo object. Patch by Ippei Obayashi. [ruby-dev:45095] [Bug #5845] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-07Cent OS 5.6 (2.6.18-238.19.1.el5xen) doesn't correctly worknaruse
sendmsg with pktinfo for link-local ipv6 addresses git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03add test for close-on-exec.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03close a socket in test_socket_new.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-13* test/socket/test_socket.rb (test_connect_timeout): added a testakr
based on a patch by Eric Wong. [ruby-core:38910] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-13* test/socket/test_unix.rb: don't use Thread.abort_on_exception.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-13* ext/socket/unixsocket.c (unix_send_io): race condition fixed.akr
(unix_recv_io): ditto. fixed by Eric Wong. [ruby-core:35574] * test/socket/test_unix.rb: test added for above problem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-12* lib/test/unit.rb (assert_include): add alias.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-12* thread.c (rb_thread_io_blocking_region): new function to runnobu
blocking region with GIL released, for fd. * thread.c (rb_thread_fd_close): implement. [ruby-core:35203] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-01* test/socket/test_addrinfo.rb: extract Errno::EADDRINUSE as a method.akr
* test/socket/test_socket.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-24refine an assertion message.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-23* ext/socket/raddrinfo.c (ruby_getaddrinfo__darwin): new workaround forakr
getaddrinfo problem on Mac OS X Snow Leopard. [ruby-core:29427] patch by Wataru Kimura. [ruby-core:30842] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-14* test/socket/test_socket.rb (test_udp_server): rescue Errno::ENOSYSakr
for Windows. * test/socket/test_nonblock.rb (test_sendmsg_nonblock_error): ditto. [ruby-dev:41597] reported by Masaya Tarui. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-19* test/socket/test_addrinfo.rb: ipaddr.rb defines Socket::AF_INET6 as an Objectusa
if the constant is not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-28* test/socket/test_unix.rb (TestSocket_UNIXSocket#test_recvmsg):nobu
skip if AncillaryData is not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-23call unix_server.close only if unix_server is not nil.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25* lib/matrix.rb: suppress warnings.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-19Use UDP for sendmsg/recvmsg tests.akr
sendmsg/recvmsg doesn't work with SOCK_STREAM on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-19* test_socket.rb (test_udp_server): cannot check the existance of sendmsg byusa
respond_to?. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-17fix skip condition.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-17 * ext/socket/socket.c (socket_s_ip_address_list): drop inactiveusa
adapters. * test/socket/test_{nonblock,addrinfo,socket}.rb: skip some tests on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-01* include/ruby/intern.h (rb_time_num_new): declared.akr
* time.c (nsec2timev): extracted from time_new_internal. (time_new_internal): change argument to VALUE. (rb_time_new): follow the argument change. (rb_time_nano_new): ditto. (rb_time_num_new): new function. * ext/socket/ancdata.c (ancillary_timestamp): use rb_time_num_new to represent struct bintime preciously. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-18don't use /tmp as example socket path.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-19use IO::WaitWritable.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-19* io.c (rb_mWaitReadable): defined.akr
(rb_mWaitWritable): defined. (io_getpartial): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. (rb_io_write_nonblock): extend IO::WaitWritable on EWOULDBLOCK and EAGAIN. * error.c (make_errno_exc): extracted from rb_sys_fail. (rb_mod_sys_fail): new function. * include/ruby/ruby.h (rb_mod_sys_fail): declared. (rb_mWaitReadable): declared. (rb_mWaitWritable): declared. * ext/socket/init.c (rsock_s_recvfrom_nonblock): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. (rsock_s_accept_nonblock): extend IO::WaitReadable on EWOULDBLOCK, EAGAIN, ECONNABORTED and EPROTO. * ext/socket/socket.c (sock_connect_nonblock): extend IO::WaitWritable on EINPROGRESS. * ext/socket/ancdata.c (bsock_sendmsg_internal): extend IO::WaitWritable on EWOULDBLOCK and EAGAIN. (bsock_recvmsg_internal): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. * ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): raise SSLError extended by IO::WaitReadable/IO::WaitWritable on SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE. * ext/openssl/ossl.c (ossl_make_error): extracted from ossl_raise. (ossl_exc_new): new function. * ext/openssl/ossl.h (ossl_exc_new): declared. * lib/net/protocol.rb (rbuf_fill): rescue IO::WaitReadable and IO::WaitWritable. [ruby-core:22539], [ruby-dev:38140] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14assert connects doesn't raise.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06* {ext,lib,test}/**/*.rb: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-02* ext/socket/ancdata.c (rsock_discard_cmsg_resource): definedakr
unconditionally. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-28* ext/socket/ancdata.c (ancillary_unix_rights): check message type.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-27* ext/socket/ancdata.c (bsock_recvmsg_internal): close FDs passed byakr
SCM_RIGHTS unless :scm_rights=>true is given. (discard_cmsg): extracted from rsock_discard_cmsg_resource. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-27add a test.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-26* ext/socket/lib/socket.rb (BasicSocket#connect_address): new method.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25* ext/socket/option.c (sockopt_level): extracted from sockopt_level_m.akr
(sockopt_optname): extracted from sockopt_optname_m. (sockopt_data): apply StringValue. (sockopt_s_linger): new method. (sockopt_linger): new method. (inspect_linger): show onoff value if it is neither 0 nor 1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e