<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/resolv/test_dns.rb, branch v4.0.2</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/resolv] Fix syntax error on older versions</title>
<updated>2025-11-18T07:17:31+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-11-18T07:10:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=54c07383095957c49d91300af6012ff43d41160f'/>
<id>54c07383095957c49d91300af6012ff43d41160f</id>
<content type='text'>
https://github.com/ruby/resolv/commit/599f78c451
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/resolv/commit/599f78c451
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix condition for Timeout Error with &gt;= macOS 26.1</title>
<updated>2025-11-10T02:10:23+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2025-11-10T02:10:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8fa29a75abf265c20cdeb9779bf25c1b3eafcf26'/>
<id>8fa29a75abf265c20cdeb9779bf25c1b3eafcf26</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Omit unknown DNS issue of macOS 26.1 beta</title>
<updated>2025-10-27T01:52:42+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2025-10-27T01:14:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4bd9cbd3eba28c855efa0e669ea5be302224e338'/>
<id>4bd9cbd3eba28c855efa0e669ea5be302224e338</id>
<content type='text'>
```
TestResolvDNS#test_no_server:
Test::Unit::ProxyError: Timeout::Error
    /path/to/ruby/test/resolv/test_dns.rb:531:in 'TestResolvDNS#test_no_server'
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
```
TestResolvDNS#test_no_server:
Test::Unit::ProxyError: Timeout::Error
    /path/to/ruby/test/resolv/test_dns.rb:531:in 'TestResolvDNS#test_no_server'
```
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/resolv] Limit decompressed name length</title>
<updated>2025-07-08T07:25:26+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2025-07-08T07:19:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9aa0300db2cd2514ca55c1f66022610ee8c3ca1f'/>
<id>9aa0300db2cd2514ca55c1f66022610ee8c3ca1f</id>
<content type='text'>
RFC 1035 specifies the 255-octet maximum name length. This change set
checks the limit.

https://github.com/ruby/resolv/commit/4c2f71b5e8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RFC 1035 specifies the 255-octet maximum name length. This change set
checks the limit.

https://github.com/ruby/resolv/commit/4c2f71b5e8
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/resolv] Omit Windows and MinGW platforms with with_udp_and_tcp</title>
<updated>2024-11-26T02:44:00+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2024-11-26T02:28:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c08e1f336c95ad4e13e20d29980f11f67334affe'/>
<id>c08e1f336c95ad4e13e20d29980f11f67334affe</id>
<content type='text'>
https://github.com/ruby/resolv/actions/runs/12021339854/job/33511655994?pr=64

```
  =&gt; 705:     with_udp_and_tcp('127.0.0.1', 0) do |u1, t1|
     706:       with_udp_and_tcp('127.0.0.1', 0) do |u2,t2|
     707:         u2.close # XXX: u2 UDP socket is not used, but using #with_udp_and_tcp to enable Windows EACCES workaround
     708:         _, server1_port, _, server1_address = u1.addr
Error: Errno::EACCES: Permission denied - bind(2) for "127.0.0.1" port 55685
```

https://github.com/ruby/ruby/actions/runs/12005069051/job/33461068529?pr=12161

```
    1) Error:
  TestResolvDNS#test_multiple_servers_with_timeout_and_truncated_tcp_fallback:
  Errno::EACCES: Permission denied - bind(2) for "127.0.0.1" port 50676
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TCPServer#initialize'
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TCPServer.new'
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TestResolvDNS#with_udp_and_tcp'
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:705:in 'TestResolvDNS#test_multiple_servers_with_timeout_and_truncated_tcp_fallback'
```

https://github.com/ruby/resolv/commit/05765df178
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/resolv/actions/runs/12021339854/job/33511655994?pr=64

```
  =&gt; 705:     with_udp_and_tcp('127.0.0.1', 0) do |u1, t1|
     706:       with_udp_and_tcp('127.0.0.1', 0) do |u2,t2|
     707:         u2.close # XXX: u2 UDP socket is not used, but using #with_udp_and_tcp to enable Windows EACCES workaround
     708:         _, server1_port, _, server1_address = u1.addr
Error: Errno::EACCES: Permission denied - bind(2) for "127.0.0.1" port 55685
```

https://github.com/ruby/ruby/actions/runs/12005069051/job/33461068529?pr=12161

```
    1) Error:
  TestResolvDNS#test_multiple_servers_with_timeout_and_truncated_tcp_fallback:
  Errno::EACCES: Permission denied - bind(2) for "127.0.0.1" port 50676
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TCPServer#initialize'
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TCPServer.new'
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TestResolvDNS#with_udp_and_tcp'
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:705:in 'TestResolvDNS#test_multiple_servers_with_timeout_and_truncated_tcp_fallback'
```

https://github.com/ruby/resolv/commit/05765df178
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/resolv] _1 is not provided in Ruby 2.5</title>
<updated>2024-11-26T00:28:06+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2024-11-26T00:22:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=36f67f6bbbacb242e2c9e8fbd6d07ac706287ba2'/>
<id>36f67f6bbbacb242e2c9e8fbd6d07ac706287ba2</id>
<content type='text'>
https://github.com/ruby/resolv/commit/83f18e2a49
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/resolv/commit/83f18e2a49
</pre>
</div>
</content>
</entry>
<entry>
<title>test/resolv/test_dns.rb: Keep `UDPSocket`s until a free port is found</title>
<updated>2024-10-10T05:44:51+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2024-10-10T05:14:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=15bb571730c4c19def9c4e1d59c9546056d9bd98'/>
<id>15bb571730c4c19def9c4e1d59c9546056d9bd98</id>
<content type='text'>
Follow up to 589f1978d8c368b8eccf34453463ad46a58d36da

I suspect `UDPSocket.new` grabs the same port number because they are
closed at each trial.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Follow up to 589f1978d8c368b8eccf34453463ad46a58d36da

I suspect `UDPSocket.new` grabs the same port number because they are
closed at each trial.
</pre>
</div>
</content>
</entry>
<entry>
<title>mingw environment can't bind free port with 10 times. We should omit it instead of test failure.</title>
<updated>2024-10-09T02:28:40+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2024-10-09T01:57:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=589f1978d8c368b8eccf34453463ad46a58d36da'/>
<id>589f1978d8c368b8eccf34453463ad46a58d36da</id>
<content type='text'>
```
 1) Error:
  TestResolvDNS#test_multiple_servers_with_timeout_and_truncated_tcp_fallback:
  Errno::EACCES: Permission denied - bind(2) for "127.0.0.1" port 59677
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TCPServer#initialize'
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TCPServer.new'
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TestResolvDNS#with_udp_and_tcp'
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:711:in 'TestResolvDNS#test_multiple_servers_with_timeout_and_truncated_tcp_fallback'

    2) Error:
  TestResolvDNS#test_query_ipv4_address_truncated_tcp_fallback:
  Errno::EACCES: Permission denied - bind(2) for "127.0.0.1" port 59689
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TCPServer#initialize'
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TCPServer.new'
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TestResolvDNS#with_udp_and_tcp'
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:223:in 'TestResolvDNS#test_query_ipv4_address_truncated_tcp_fallback'
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
```
 1) Error:
  TestResolvDNS#test_multiple_servers_with_timeout_and_truncated_tcp_fallback:
  Errno::EACCES: Permission denied - bind(2) for "127.0.0.1" port 59677
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TCPServer#initialize'
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TCPServer.new'
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TestResolvDNS#with_udp_and_tcp'
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:711:in 'TestResolvDNS#test_multiple_servers_with_timeout_and_truncated_tcp_fallback'

    2) Error:
  TestResolvDNS#test_query_ipv4_address_truncated_tcp_fallback:
  Errno::EACCES: Permission denied - bind(2) for "127.0.0.1" port 59689
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TCPServer#initialize'
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TCPServer.new'
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TestResolvDNS#with_udp_and_tcp'
      D:/a/ruby/ruby/src/test/resolv/test_dns.rb:223:in 'TestResolvDNS#test_query_ipv4_address_truncated_tcp_fallback'
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Specify use_ipv6 option for ipv4 test</title>
<updated>2024-10-08T06:52:49+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2024-10-08T06:23:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=63149cad81e346b8e5cd3d6058e0dfaf4fded731'/>
<id>63149cad81e346b8e5cd3d6058e0dfaf4fded731</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/resolv] test_dns: Fix FD leak</title>
<updated>2024-09-10T08:34:37+00:00</updated>
<author>
<name>Kasumi Hanazuki</name>
<email>kasumi@rollingapple.net</email>
</author>
<published>2024-08-31T07:31:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3231ac6008bdcfe605b97bf09d79b3e58a2e58a3'/>
<id>3231ac6008bdcfe605b97bf09d79b3e58a2e58a3</id>
<content type='text'>
The listening TCP socket is closed by `with_udp_and_tcp` helper, but
the connected socket is leaking.

```
Leaked file descriptor: TestResolvDNS#test_multiple_servers_with_timeout_and_truncated_tcp_fallback: 12 : #&lt;TCPSocket:fd 12, AF_INET, 127.0.0.1, 50888&gt;
COMMAND     PID     USER   FD   TYPE    DEVICE SIZE/OFF NODE NAME
ruby    3248055 chkbuild   12u  IPv4 112546322      0t0  TCP localhost:50888-&gt;localhost:40112 (CLOSE_WAIT)
```

For the purpose of the test case to simulate a timeout over TCP
transport, we have to delay closing this socket until the end the test
case.

Fixup: https://github.com/ruby/resolv/pull/50

https://github.com/ruby/resolv/commit/236c38bdb1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The listening TCP socket is closed by `with_udp_and_tcp` helper, but
the connected socket is leaking.

```
Leaked file descriptor: TestResolvDNS#test_multiple_servers_with_timeout_and_truncated_tcp_fallback: 12 : #&lt;TCPSocket:fd 12, AF_INET, 127.0.0.1, 50888&gt;
COMMAND     PID     USER   FD   TYPE    DEVICE SIZE/OFF NODE NAME
ruby    3248055 chkbuild   12u  IPv4 112546322      0t0  TCP localhost:50888-&gt;localhost:40112 (CLOSE_WAIT)
```

For the purpose of the test case to simulate a timeout over TCP
transport, we have to delay closing this socket until the end the test
case.

Fixup: https://github.com/ruby/resolv/pull/50

https://github.com/ruby/resolv/commit/236c38bdb1
</pre>
</div>
</content>
</entry>
</feed>
