ruby/test
Misaki Shioi 1683dadb19
Do not save ResolutionError if resolution succeeds for any address family (#12678)
* Do not save ResolutionError if resolution succeeds for any address family

Socket with Happy Eyeballs Version 2 performs connection attempts and name resolution in parallel.

In the existing implementation, if a connection attempt failed for one address family while name resolution was still in progress for the other, and that name resolution later failed, the method would terminate with a name resolution error.
This behavior was intended to ensure that the final error reflected the most recent failure, potentially overriding an earlier error.

However, [Bug #21088](https://bugs.ruby-lang.org/issues/21088) made me realize that terminating with a name resolution error is unnatural when name resolution succeeded for at least one address family.

This PR modifies the behavior so that if name resolution succeeds for one address family, any name resolution error from the other is not saved.

This PR includes the following changes:

* Do not display select(2) as the system call that caused the raised error, as it is for internal processing

* Fix bug: Get errno with Socket::SO_ERROR in Windows environment with a workaround for tests not passing
2025-02-03 20:26:47 +09:00
..
-ext- Move Array#map to Ruby 2024-11-13 12:27:26 -08:00
.excludes Do not intern invalid symbols in eval parse 2025-01-07 22:30:16 -05:00
.excludes-mmtk [ruby/mmtk] Unskip TestEnv#test_select_bang_in_ractor 2025-01-13 15:25:50 +00:00
cgi Make Pstore tests as optional 2025-01-10 10:19:39 +09:00
coverage [prism/compiler] end_cursor should never be NULL 2024-11-21 13:51:59 +00:00
date [ruby/date] Skip tests failing on TruffleRuby 2025-01-10 15:59:25 +00:00
did_you_mean Switch to use ostruct to open3 with suggestion test 2025-01-08 17:12:19 +09:00
digest
dtrace
erb
error_highlight [ruby/error_highlight] Ensure first_line and last_line are set 2025-01-29 08:51:42 +00:00
etc [ruby/etc] Fix sysconfdir when load-relative 2024-10-17 07:32:38 +00:00
fiber Ensure fiber scheduler re-acquires mutex when interrupted from sleep. (#12158) 2024-11-23 23:54:12 +00:00
fiddle [ruby/fiddle] Fix Fiddle.last_error on FFI backend and improve test 2025-02-03 10:22:16 +09:00
fileutils Skip some tests which don't work under permissionless containers 2024-08-23 09:34:41 +10:00
io [ruby/io-console] Add IO#ttyname that returns the tty name or nil 2024-12-02 08:03:30 +00:00
json [ruby/json] Refactor convert_UTF8_to_JSON to split searching and escaping code 2025-02-03 10:05:25 +09:00
lib
mkmf
mmtk [ruby/mmtk] Bump mmtk-core 2025-01-21 17:02:18 +00:00
monitor
net [ruby/net-http] Don't double-interrupt the test HTTP server 2024-12-31 10:00:41 +00:00
objspace Output object_id in ObjectSpace.dump 2025-01-30 11:48:14 -05:00
open-uri [ruby/open-uri] Use ENV.update 2024-11-25 08:00:03 +00:00
openssl [ruby/openssl] pkey/ec: remove deprecated PKey::EC::Point#mul(ary, ary [, bn]) form 2025-02-03 09:47:48 +00:00
optparse
pathname Allow method chaining with Pathname#mkpath 2024-10-04 12:21:27 +09:00
prism [ruby/prism] Fix rescue modifier precedence 2025-01-22 19:58:27 +00:00
psych Make Pstore tests as optional 2025-01-10 10:19:39 +09:00
resolv [ruby/resolv] Omit Windows and MinGW platforms with with_udp_and_tcp 2024-11-26 02:44:00 +00:00
ripper [Bug #21004] Fix memory leak with "it" in parse.y 2025-01-05 09:06:12 +09:00
ruby Add out of range tests of random number generator 2025-02-03 00:27:43 +09:00
rubygems [rubygems/rubygems] Bump the rb-sys group across 2 directories with 1 update 2025-02-03 10:05:36 +09:00
set [ruby/set] Fix ^ to respect subclasses 2024-12-02 08:28:58 +09:00
socket Do not save ResolutionError if resolution succeeds for any address family (#12678) 2025-02-03 20:26:47 +09:00
stringio [ruby/stringio] Copy from the relocated string 2024-11-05 05:01:03 +00:00
strscan [ruby/strscan] test: don't omit "(...)" for method calls that have at least one argument 2024-12-02 10:50:34 +09:00
uri [ruby/uri] Suppress deprecate warning of test class (retry) 2024-11-26 10:02:58 +00:00
win32 [ruby/win32-registry] Fix compatibility with JRuby 2024-10-17 01:51:41 +00:00
yaml [ruby/yaml] We should load rubygems for optional pstore gem 2025-01-14 04:36:25 +00:00
zlib [ruby/zlib] Don't call rb_str_set_len while released the GVL. 2024-11-20 21:02:16 +00:00
runner.rb
test_bundled_gems.rb Update test args with bundled gems. webrick has been removed that targets 2024-09-30 19:10:16 +09:00
test_delegate.rb
test_extlibs.rb Disabled to existence test for win32ole 2025-01-16 12:35:21 +09:00
test_find.rb
test_forwardable.rb
test_ipaddr.rb [ruby/ipaddr] Added to_json/as_json method 2024-10-18 15:00:37 +00:00
test_open3.rb
test_pp.rb [ruby/pp] Fix pretty printing range begin/end with false or nil 2024-11-19 14:52:01 +00:00
test_prettyprint.rb
test_pty.rb Add sleep to PTY tests to stabilize flaky failures (#12691) 2025-02-03 16:07:19 +09:00
test_rbconfig.rb
test_securerandom.rb [ruby/securerandom] Restore SecureRandom.alphanumeric same as Random::Formatter.alphanumeric of Ruby 3.3/3.4 2024-12-16 05:35:47 +00:00
test_shellwords.rb [ruby/shellwords] NUL char cannot be in shell words 2024-12-04 07:48:59 +00:00
test_singleton.rb
test_tempfile.rb [ruby/tempfile] Support anonymous tempfile on earlier than Ruby 3.2 2024-08-26 02:49:02 +00:00
test_time.rb
test_timeout.rb [ruby/timeout] updated tests 2024-12-03 06:49:56 +00:00
test_tmpdir.rb [ruby/tmpdir] Fix for path-like objects 2024-12-16 09:40:01 +00:00
test_trick.rb
test_tsort.rb
test_unicode_normalize.rb
test_weakref.rb