summaryrefslogtreecommitdiff
path: root/spec/ruby/library/socket
AgeCommit message (Collapse)Author
8 daysAvoid flaky test failures by retrying on local port conflicts (#15818)Misaki Shioi
This test obtains an available port number by calling `TCPServer.new`, then closes it and passes the same port number as `local_port` to `TCPSocket.new`. However, `TCPSocket.new` could occasionally fail with `Errno::EADDRINUSE` at the bind(2) step. I believe this happens when tests are run in parallel and another process on the same host happens to bind the same port in the short window between closing the `TCPServer` and calling `TCPSocket.new`. To address this race condition, the test now retries with a newly selected available port when such a conflict occurs.
11 daysUNIXSocket#recvfrom only returns the path on LinuxBenoit Daloze
* Notably it does not on BSD, macOS and Windows.
11 daysRemove assertion which does not holdBenoit Daloze
* https://github.com/ruby/ruby/actions/runs/20694508956/job/59407571754 1) UNIXSocket.pair emulates unnamed sockets with a temporary file with a path FAILED Expected "C:\\a\\_temp\\102424668889-2384.($)".match? /\\AppData\\Local\\Temp\\\d+-\d+\.\(\$\)\z/ to be truthy but was false
11 daysGet better error if UNIXSocket.socketpair spec failsBenoit Daloze
11 daysUpdate to ruby/spec@94dbd55Benoit Daloze
11 daysUpdate to ruby/spec@f54296dBenoit Daloze
2025-10-09FreeBSD returns EAI_FAIL instead of EAI_FAMILY in getaddrinfo and ↵Benoit Daloze
getnameinfo specs
2025-10-08Update to ruby/spec@3d7e563Benoit Daloze
2025-06-02Update to ruby/spec@4d2fc4dAndrew Konchin
Notes: Merged: https://github.com/ruby/ruby/pull/13495
2025-05-16"binary" is not valid encoding name in EmacsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/13361
2025-05-09Update to ruby/spec@d8bacefAndrew Konchin
Notes: Merged: https://github.com/ruby/ruby/pull/13265
2025-04-02Removed Solaris conditions from library directoryHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13037
2025-03-27Update to ruby/spec@5e579e2Andrew Konchin
Notes: Merged: https://github.com/ruby/ruby/pull/12984
2025-02-07Retry on IO::EAGAINWaitReadable when a closed socket is still not available ↵Andrew Konchin
for reading Notes: Merged: https://github.com/ruby/ruby/pull/12710
2025-01-31Prefer `platform_is_not :windows`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/12682
2025-01-30Update to ruby/spec@affef93Andrew Konchin
Notes: Merged: https://github.com/ruby/ruby/pull/12679
2025-01-29Add fallback for `hostname` if `uname` isn't available. (#12655)Samuel Williams
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2025-01-28Prefer `uname -n` over `hostname`. (#12647)Samuel Williams
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2024-12-31Fix leak in Socket#connect specBenoit Daloze
* Found by https://github.com/ruby/ruby/actions/runs/12560692556/job/35018412527?pr=12492 Notes: Merged: https://github.com/ruby/ruby/pull/12492
2024-12-28Abandon connection test if off lineNobuyoshi Nakada
2024-12-03Socket#connect may be raise ECONNREFUSEDKazuhiro NISHIYAMA
On my environment with `sudo ufw default reject outgoing`, outgoing packets are filtered without allow rules. Notes: Merged: https://github.com/ruby/ruby/pull/12238
2024-11-06Update to ruby/spec@54c391eBenoit Daloze
2024-10-12Support `IO#timeout` for `rsock_connect`. (#11880)Samuel Williams
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2024-07-02Update to ruby/spec@f8987acAndrew Konchin
2024-05-19Update to ruby/spec@6b04c1dAndrew Konchin
2024-04-02Update to ruby/spec@573cf97Andrew Konchin
2024-03-14Update to ruby/spec@89175b2Benoit Daloze
2024-03-05[DOC] fix some commentscui fliter
Signed-off-by: cui fliter <imcusg@gmail.com>
2024-02-15ruby-spec: Accept the receiver in backtracesYusuke Endoh
2024-02-15ruby-spec: Accept both a backtick and a single quote in error messagesYusuke Endoh
2024-02-05Update to ruby/spec@3fc4444Benoit Daloze
2023-11-30Fix failing specMisaki Shioi
2023-10-30Update to ruby/spec@bd7017fBenoit Daloze
2023-09-30Fix failures when all network interfaces are downNobuyoshi Nakada
2023-08-30BasicSocket#recv* return `nil` rather than an empty packetJean Boussier
[Bug #19012] man recvmsg(2) states: > Return Value > These calls return the number of bytes received, or -1 if an error occurred. > The return value will be 0 when the peer has performed an orderly shutdown. Not too sure how one is supposed to make the difference between a packet of size 0 and a closed connection. Notes: Merged: https://github.com/ruby/ruby/pull/6407
2023-06-26Update to ruby/spec@30e1c35Benoit Daloze
2023-05-29Update to ruby/spec@c3677cfBenoit Daloze
2023-04-21Skip when unix socket path is too longNobuyoshi Nakada
Eventually the path directly under "/tmp" is complained by `rm_r` in spec/mspec/lib/mspec/helpers/fs.rb. Notes: Merged: https://github.com/ruby/ruby/pull/7749
2023-02-27Update to ruby/spec@e7dc804Benoit Daloze
2022-10-07Add IO#timeout attribute and use it for blocking IO operations. (#5653)Samuel Williams
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2022-09-29Skip unpack_sockaddr_in with http at Solaris platformHiroshi SHIBATA
http://rubyci.s3.amazonaws.com/solaris10-gcc/ruby-master/log/20220929T050003Z.fail.html.gz
2022-09-28Update to ruby/spec@1d9d5c6Benoit Daloze
2021-12-08Skip bind port 1 when ip_unprivileged_port_start<=1Kazuhiro NISHIYAMA
Linux can allow to bind port 1 to user. And `ip_unprivileged_port_start` is 0 on [lima](https://github.com/lima-vm/lima) default vm. ``` 1) Socket#bind on SOCK_DGRAM socket raises Errno::EACCES when the current user does not have permission to bind FAILED Expected Errno::EACCES but no exception was raised (0 was returned) .../ruby/spec/ruby/library/socket/socket/bind_spec.rb:38:in `block (4 levels) in <top (required)>' .../ruby/spec/ruby/library/socket/socket/bind_spec.rb:4:in `<top (required)>' 2) Socket#bind on SOCK_STREAM socket raises Errno::EACCES when the current user does not have permission to bind FAILED Expected Errno::EACCES but no exception was raised (0 was returned) .../ruby/spec/ruby/library/socket/socket/bind_spec.rb:79:in `block (4 levels) in <top (required)>' .../ruby/spec/ruby/library/socket/socket/bind_spec.rb:44:in `<top (required)>' 3) Socket#bind using IPv4 using a packed socket address raises Errno::EACCES when the user is not allowed to bind to the port FAILED Expected Errno::EACCES but no exception was raised (0 was returned) .../ruby/spec/ruby/library/socket/socket/bind_spec.rb:119:in `block (6 levels) in <top (required)>' .../ruby/spec/ruby/library/socket/socket/bind_spec.rb:85:in `<top (required)>' 4) Socket#bind using IPv6 using a packed socket address raises Errno::EACCES when the user is not allowed to bind to the port FAILED Expected Errno::EACCES but no exception was raised (0 was returned) .../ruby/spec/ruby/library/socket/socket/bind_spec.rb:119:in `block (6 levels) in <top (required)>' .../ruby/spec/ruby/library/socket/socket/bind_spec.rb:85:in `<top (required)>' ```
2021-10-20Update to ruby/spec@d6921efBenoit Daloze
2021-10-05Update to ruby/spec@ccf0d85Benoit Daloze
2021-07-29Update to ruby/spec@b65d01fBenoit Daloze
2021-03-27Update to ruby/spec@fd6edddBenoit Daloze
2021-01-28Update to ruby/spec@8cafaa5Benoit Daloze
2020-11-13Update to ruby/spec@b0b7f53Benoit Daloze
2020-10-12spec/ruby/library/socket/socket/listen_spec.rb: Allow both EACCES and EOPNOSUPPYusuke Endoh
on Android