<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/socket/test_addrinfo.rb, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Replace SocketError with Socket::ResolutionError in rsock_raise_socket_error</title>
<updated>2023-11-30T04:27:19+00:00</updated>
<author>
<name>Misaki Shioi</name>
<email>shioi.mm@gmail.com</email>
</author>
<published>2023-11-23T07:49:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=52f6de41961d511e82826d6266441d91a92dcd59'/>
<id>52f6de41961d511e82826d6266441d91a92dcd59</id>
<content type='text'>
rsock_raise_socket_error is called only when getaddrinfo and getaddrname fail
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rsock_raise_socket_error is called only when getaddrinfo and getaddrname fail
</pre>
</div>
</content>
</entry>
<entry>
<title>test/socket/test_addrinfo.rb: Suppress Errno::EACCES on Windows</title>
<updated>2022-12-21T06:18:34+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-12-21T06:18:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1a24442193fe437e761e941d1ae0923d45fbb92f'/>
<id>1a24442193fe437e761e941d1ae0923d45fbb92f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use omit instead of skip: test/socket/**/*.rb</title>
<updated>2021-12-28T11:29:54+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2021-12-28T11:29:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=55cdb8b01392848e426521f1589d51dc0fca9608'/>
<id>55cdb8b01392848e426521f1589d51dc0fca9608</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use Test::Unit::AssertionFailedError instead of MiniTest::Assertion for test-unit migration</title>
<updated>2021-09-06T09:34:15+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2021-09-06T09:34:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=940a19e4b3ae1ce466c3bc912175b4ef7c615c53'/>
<id>940a19e4b3ae1ce466c3bc912175b4ef7c615c53</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Get rid of sporadic WSAEACCES on Windows [ruby-dev:42661]</title>
<updated>2021-05-21T09:26:07+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2021-05-20T11:15:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e9974a466ac7edcb8035f5f7bc65c4c6731e2ee2'/>
<id>e9974a466ac7edcb8035f5f7bc65c4c6731e2ee2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make Socket.getaddrinfo interruptible (#2827)</title>
<updated>2020-08-27T07:39:13+00:00</updated>
<author>
<name>Kir Shatrov</name>
<email>shatrov@me.com</email>
</author>
<published>2020-08-27T07:39:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2038cc6cab6ceeffef3ec3a765c70ae684f829ed'/>
<id>2038cc6cab6ceeffef3ec3a765c70ae684f829ed</id>
<content type='text'>
Before, Socket.getaddrinfo was using a blocking getaddrinfo(3) call.
That didn't allow to wrap it into Timeout.timeout or interrupt the thread in any way.

Combined with the default 10 sec resolv timeout on many Unix systems, this can
have a very noticeable effect on production Ruby apps being not
resilient to DNS outages and timing out name resolution, and being unable to fail fast even
with Timeout.timeout.

Since we already have support for getaddrinfo_a(3), the async version
of getaddrinfo, we should be able to make Socket.getaddrinfo leverage that
when getaddrinfo_a version is available in the system (hence #ifdef
HAVE_GETADDRINFO_A).

Related tickets:
https://bugs.ruby-lang.org/issues/16476
https://bugs.ruby-lang.org/issues/16381
https://bugs.ruby-lang.org/issues/14997</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before, Socket.getaddrinfo was using a blocking getaddrinfo(3) call.
That didn't allow to wrap it into Timeout.timeout or interrupt the thread in any way.

Combined with the default 10 sec resolv timeout on many Unix systems, this can
have a very noticeable effect on production Ruby apps being not
resilient to DNS outages and timing out name resolution, and being unable to fail fast even
with Timeout.timeout.

Since we already have support for getaddrinfo_a(3), the async version
of getaddrinfo, we should be able to make Socket.getaddrinfo leverage that
when getaddrinfo_a version is available in the system (hence #ifdef
HAVE_GETADDRINFO_A).

Related tickets:
https://bugs.ruby-lang.org/issues/16476
https://bugs.ruby-lang.org/issues/16381
https://bugs.ruby-lang.org/issues/14997</pre>
</div>
</content>
</entry>
<entry>
<title>test/socket/test_addrinfo.rb: Fix syntax error</title>
<updated>2020-06-04T02:29:39+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2020-06-04T02:29:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3d7138871079d02b31c05ca6af943d56365a8776'/>
<id>3d7138871079d02b31c05ca6af943d56365a8776</id>
<content type='text'>
Sorry!
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sorry!
</pre>
</div>
</content>
</entry>
<entry>
<title>test/socket/test_addrinfo.rb: Suppress Errno::EACCES when addr is in use</title>
<updated>2020-06-04T02:24:19+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2020-06-04T02:22:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=980655ce8319f7c96f286ac0abdfbc98b2090a96'/>
<id>980655ce8319f7c96f286ac0abdfbc98b2090a96</id>
<content type='text'>
MinGW seems to raise Errno::EACCES instead of EADDRINUSE when bind fails
due to in use.

https://github.com/ruby/ruby/runs/736825846
```
  2) Error:
TestSocketAddrinfo#test_connect_from:
Errno::EACCES: Permission denied - bind(2) for 0.0.0.0:49721
    D:/a/ruby/ruby/build/.ext/common/socket.rb:54:in `bind'
    D:/a/ruby/ruby/build/.ext/common/socket.rb:54:in `connect_internal'
    D:/a/ruby/ruby/build/.ext/common/socket.rb:114:in `connect_from'
    D:/a/ruby/ruby/src/test/socket/test_addrinfo.rb:379:in `block in test_connect_from'
    D:/a/ruby/ruby/src/test/socket/test_addrinfo.rb:374:in `open'
    D:/a/ruby/ruby/src/test/socket/test_addrinfo.rb:374:in `test_connect_from'
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MinGW seems to raise Errno::EACCES instead of EADDRINUSE when bind fails
due to in use.

https://github.com/ruby/ruby/runs/736825846
```
  2) Error:
TestSocketAddrinfo#test_connect_from:
Errno::EACCES: Permission denied - bind(2) for 0.0.0.0:49721
    D:/a/ruby/ruby/build/.ext/common/socket.rb:54:in `bind'
    D:/a/ruby/ruby/build/.ext/common/socket.rb:54:in `connect_internal'
    D:/a/ruby/ruby/build/.ext/common/socket.rb:114:in `connect_from'
    D:/a/ruby/ruby/src/test/socket/test_addrinfo.rb:379:in `block in test_connect_from'
    D:/a/ruby/ruby/src/test/socket/test_addrinfo.rb:374:in `open'
    D:/a/ruby/ruby/src/test/socket/test_addrinfo.rb:374:in `test_connect_from'
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove check of ai.protocol</title>
<updated>2019-09-10T03:39:49+00:00</updated>
<author>
<name>Masaki Matsushita</name>
<email>glass.saga@gmail.com</email>
</author>
<published>2019-09-10T03:39:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f5024de002fa82dfe5730b245ad24b8fc3a68424'/>
<id>f5024de002fa82dfe5730b245ad24b8fc3a68424</id>
<content type='text'>
Solaris 10 returns addrinfo.ai_protocol as 0, not 6.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Solaris 10 returns addrinfo.ai_protocol as 0, not 6.
</pre>
</div>
</content>
</entry>
<entry>
<title>Support timeout for Addrinfo</title>
<updated>2019-09-10T01:10:59+00:00</updated>
<author>
<name>Masaki Matsushita</name>
<email>glass.saga@gmail.com</email>
</author>
<published>2019-09-10T00:57:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0e9d56f5e73ed2fd8e7c858fdea7b7d5b905bb64'/>
<id>0e9d56f5e73ed2fd8e7c858fdea7b7d5b905bb64</id>
<content type='text'>
Addrinfo.getaddrinfo and .foreach now accepts :timeout in seconds as
a keyword argument. If getaddrinfo_a(3) is available, the timeout will be
applied for name resolution. Otherwise, it will be ignored.

Socket.tcp accepts :resolv_timeout to use this feature.

This commit is retry of 6382f5cc91ac9e36776bc854632d9a1237250da7.
Test was failed on Solaris machines which don't have "http" in
/etc/services. In this commit, use "ssh" instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Addrinfo.getaddrinfo and .foreach now accepts :timeout in seconds as
a keyword argument. If getaddrinfo_a(3) is available, the timeout will be
applied for name resolution. Otherwise, it will be ignored.

Socket.tcp accepts :resolv_timeout to use this feature.

This commit is retry of 6382f5cc91ac9e36776bc854632d9a1237250da7.
Test was failed on Solaris machines which don't have "http" in
/etc/services. In this commit, use "ssh" instead.
</pre>
</div>
</content>
</entry>
</feed>
