summaryrefslogtreecommitdiff
path: root/spec/ruby/library/socket/socket
AgeCommit message (Collapse)Author
2019-07-27Update to ruby/spec@875a09eBenoit Daloze
2019-06-27Update to ruby/spec@8d74d49Benoit Daloze
2019-06-06Make specs pass on OpenBSDJeremy Evans
Skip Process clockres specs that don't work on either FreeBSD or Solaris/AIX in addition to OpenBSD. Run most current String#crypt specs on non-OpenBSD, and add a new set of crypt specs for OpenBSD, which support bcrypt but not DES in crypt(3). Use @server.connect_address instead of @server.getsockname in some socket tests, as OpenBSD does not treat connection to all zero IPv4 or IPv6 addresses as connection to localhost. When trying to connect using UDP on an unsupported address family, allow Errno::EPROTONOSUPPORT in addition to Errno::EAFNOSUPPORT, as OpenBSD raises the former.
2019-05-30Update to ruby/spec@0ba5312Benoit Daloze
2019-05-29Skip spec broken since a66bc2c01194a9c017c874a30db5b3b6bd95e966Takashi Kokubun
This has not worked since the merge https://travis-ci.org/ruby/ruby/jobs/538438184
2019-05-28Update to ruby/spec@9a501a8Benoit Daloze
2019-02-05Make sure to wait with IO.select before using Socket#accept_nonblock and ↵eregon
recvfrom_nonblock * On all platforms, as this is the recommended code pattern. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-05Make sure to wait with IO.select before using Socket#recvfrom_nonblockeregon
* On all platforms, as this is the recommended code pattern. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-05Pass the Array from select() to Socket.udp_server_recveregon
* As mentioned in the documentation. * Use Array#size instead of #count, it's more common. * Use :unset, it clarifies things if the specs fails. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-05Make sure to wait for socket to be readable.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-04add debug codeko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-26spec/ruby/library/socket/socket/bind_spec.rb: allow to run under dockermame
A root user runs the spec without Errno::EACCES git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-06accept_loop_spec.rb: avoid random hangk0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-27Update to ruby/spec@cdd6ff7eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-22Wait accept is ready also on Solarisnaruse
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20181121T212405Z.diff.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-22io + socket: make pipes and sockets nonblocking by defaultnormal
All normal Ruby IO methods (IO#read, IO#gets, IO#write, ...) are all capable of appearing to be "blocking" when presented with a file description with the O_NONBLOCK flag set; so there is little risk of incompatibility within Ruby-using programs. The biggest compatibility risk is when spawning external programs. As a result, stdin, stdout, and stderr are now always made blocking before exec-family calls. This change will make an event-oriented MJIT usable if it is waiting on pipes on POSIX_like platforms. It is ALSO necessary to take advantage of (proposed lightweight concurrency (aka "auto-Fiber") or any similar proposal for network concurrency: https://bugs.ruby-lang.org/issues/13618 Named-pipe (FIFO) are NOT yet non-blocking by default since they are rarely-used and may introduce compatibility problems and extra syscall overhead for a common path. Please revert this commit if there are problems and if I am afk since I am afk a lot, lately. [ruby-core:89950] [Bug #14968] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-01Remove wrong spec.usa
[Bug#15067] [ruby-core:88828] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-23getifaddrs_spec.rb: `should` returned `nil` on successnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-23getifaddrs_spec.rb: allow no addressnobu
* spec/ruby/library/socket/socket/getifaddrs_spec.rb: allow no address for platform dependent failures. https://travis-ci.org/ruby/ruby/jobs/445126982#L2234-L2244 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-13Add missing requirenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-13tests: support Linux kernels with CONFIG_IPV6=nnormal
Detecting the presence of constants in C headers is insufficient, as a Linux kernel can be built with CONFIG_IPV6=n git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-25Update to ruby/spec@241f9e7eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-05Add platform guards for AIXeregon
* Most of these seem OS bugs. * See https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180905T103302Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Simplify guards, the behavior seems Linux-specificeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-24Add AIX guardsnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22Also skip on AIXnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21Only run the spec on Linuxeregon
* Other platforms seem to behave differently. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21AIX also timeouts the specnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18Special case for Solaris 11x on RubyCIeregon
* Where localhost is an alias but not the primary name of 127.0.0.1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18Be more flexible in the protocol value returned by getaddrinfo()eregon
* Only Solaris 2.10 i386 and Windows seem to return 0 it and other Solaris seem to fill the value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18Use ftp for the service in getaddrinfo/getnameinfo/getservbyname specseregon
* Solaris cannot resolve 'http' but can resolve 'ftp'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18Accept TypeError for Socket#getnameinfoeregon
* Happens when VALIDATE_SOCKLEN() actually checks the length such as on FreeBSD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18Re-add socket specseregon
* This reverts commit df9521fd043df1fb862e46f9b1af83223f16eb2d: "Remove failing spec files" * Platform guards follow in the next commits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17Guard spec failing on Solariseregon
* https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20180817T182406Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17Add guard for Solaris in Socket#connect_nonblock speceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17Guard connect_nonblock spec on FreeBSDeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17Re-add specseregon
* This reverts commit 325fd389018897bd156837639675517ef3b7dea5. * Platform guards in the next commit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-16apply r64239 to macOS toonobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-12skip non-IP interfacesnobu
* spec/ruby/library/socket/socket/getifaddrs_spec.rb: VirtualBox host only adapter seems something different than ordinary interfaces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11Solaris 10 doesn't have getifaddrsnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-10Remove failing specsnaruse
https://rubyci.org/logs/rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20180810T183001Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-10Remove failing spec filesnaruse
Re-commit after specs are fixed. http://rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20180810T063001Z.log.html.gz http://rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20180809T191808Z.log.html.gz http://rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20180809T192406Z.log.html.gz http://rubyci.s3.amazonaws.com/unstable10s/ruby-trunk/log/20180809T151911Z.log.html.gz http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180809T192507Z.log.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09Don't run the spec on Solarisnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09apply r64239 to macOS toonobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09apply r64239 to macOS toonobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09Don't run specs on Solarisnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09spec/ruby/library/socket/*: more FreeBSD fixesnormal
FreeBSD portability notes: Loopback connections are not instantaneous (unlike Linux), so non-blocking read-after-write MUST check for readability via IO.select or IO#wait_readable before attempting non-blocking recv/read operations. IPv6 seems favored, so we'll get "::" instead of "0.0.0.0" Some constants are different or obsolete, so that should be self-explanatory. There are still other failures I or somebody else needs to get to when we have time and feel like dealing with spec DSL: http://rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/recent.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-08skip hanging-up tests on macOSnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-08spec/ruby/library/socket/*: fix hanging on FreeBSD 11.1normal
There are still other test failures which need fixing on FreeBSD. Keep an eye on: http://rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/recent.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03spec/ruby/library/socket/socket/getaddrinfo_spec.rb: avoid nonsensical lookupnormal
"http" is a TCP service, so /etc/services on typical GNU/Linux systems only specify a TCP port for it. Use "discard" since it seems used for other specs and is specified as both TCP and UDP. This caused many CI failures like the following: git clone https://gist.github.com/812a9b747e4c4cb2e844d4be7991cd2d git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e