An interpreter of object-oriented scripting language
Go to file
Jarek Prokop c05390bc53 Fix networking tests failining when only loopback network device is available.
When only a loopback device is available for networking, a few Rinda
tests that rely on multicast fail in addition to a TCP timeout case that
is trying to reach an IP 192.0.2.1 (TEST-NET-1 address block) to fail
on a timeout. However, localhost does not have a route to that address
space without further setup, so just rescuing ENETUNREACH is enough
here.

Similarly to the timeout case, multicast would have to be turned on for
loopback device but also a route added for the device.

These usually require root privileges that we do not have during
mockbuild, so skipping the tests is simpler alternative.

Account for when multicast is not properly setup on the networking device.
appends Errno:ENETUNREACH to existing timeout.

Multicast rescues also ENOBUFS and ENODEV,

Backport
89aa09afaf
94e79e4c2d

Example test cases showing classes of failures fixed:
~~~
  1) Failure:
TestSocket_TCPSocket#test_initialize_connect_timeout [/builddir/build/BUILD/ruby-3.0.7/test/socket/test_tcp.rb:73]:
[Errno::ETIMEDOUT] exception expected, not #<Errno::ENETUNREACH: Network is unreachable - connect(2) for "192.0.2.1" port 80>.

  2) Error:
Rinda::TestRingFinger#test_make_socket_ipv4_multicast:
Errno::ENETUNREACH: Network is unreachable - connect(2) for 239.0.0.1:7647
    /builddir/build/BUILD/ruby-3.0.7/lib/rinda/ring.rb:434:in `connect'
    /builddir/build/BUILD/ruby-3.0.7/lib/rinda/ring.rb:434:in `make_socket'
    /builddir/build/BUILD/ruby-3.0.7/test/rinda/test_rinda.rb:863:in `test_make_socket_ipv4_multicast'

  4) Error:
Rinda::TestRingServer#test_make_socket_ipv4_multicast:
Errno::ENODEV: No such device - setsockopt(2)
    /builddir/build/BUILD/ruby-3.0.7/lib/rinda/ring.rb:152:in `setsockopt'
    /builddir/build/BUILD/ruby-3.0.7/lib/rinda/ring.rb:152:in `make_socket'
    /builddir/build/BUILD/ruby-3.0.7/test/rinda/test_rinda.rb:694:in `test_make_socket_ipv4_multicast'
~~~

Failing test names:
TestSocket_TCPSocket#test_initialize_connect_timeout
Rinda::TestRingFinger#test_make_socket_ipv4_multicast
Rinda::TestRingFinger#test_make_socket_ipv4_multicast_hops
Rinda::TestRingServer#test_make_socket_ipv4_multicast
Rinda::TestRingServer#test_ring_server_ipv4_multicast

Resolves: RHEL-192226
2026-08-11 11:30:11 +02:00
.gitlab/merge_request_templates Add a merge-request (pull-request, PR) template to communicate more on a PR. 2022-08-16 17:25:30 +00:00
.gitignore .gitignore: Remove the setting to ignore any directories. 2022-08-16 17:25:30 +00:00
gating.yaml Add gating.yaml based on baseosci results 2022-02-14 08:40:39 +00:00
libruby.stp RHEL 9.0.0 Alpha bootstrap 2020-10-14 21:55:41 -07:00
macros.ruby RHEL 9.0.0 Alpha bootstrap 2020-10-14 21:55:41 -07:00
macros.rubygems Pass ldflags to gem install 2021-08-19 16:24:37 +02:00
operating_system.rb RHEL 9.0.0 Alpha bootstrap 2020-10-14 21:55:41 -07:00
ruby-1.9.3-mkmf-verbose.patch RHEL 9.0.0 Alpha bootstrap 2020-10-14 21:55:41 -07:00
ruby-2.1.0-always-use-i386.patch Upgrade to Ruby 3.0.7. 2024-05-13 14:23:34 +02:00
ruby-2.1.0-custom-rubygems-location.patch Upgrade to Ruby 3.0.7. 2024-05-13 14:23:34 +02:00
ruby-2.1.0-Enable-configuration-of-archlibdir.patch Upgrade to Ruby 3.0.7. 2024-05-13 14:23:34 +02:00
ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch Upgrade to Ruby 3.0.7. 2024-05-13 14:23:34 +02:00
ruby-2.3.0-ruby_version.patch Upgrade to Ruby 3.0.7. 2024-05-13 14:23:34 +02:00
ruby-2.7.0-Initialize-ABRT-hook.patch Upgrade to Ruby 3.0.7. 2024-05-13 14:23:34 +02:00
ruby-2.7.1-Timeout-the-test_bug_reporter_add-witout-raising-err.patch Merged update from upstream sources 2021-01-08 15:41:21 +00:00
ruby-3.0.7-Rescue-networking-exceptions-for-localhost-only-host-networking.patch Fix networking tests failining when only loopback network device is available. 2026-08-11 11:30:11 +02:00
ruby-3.1.0-Add-more-support-for-generic-pkey-types.patch Update OpenSSL 3 compatibility patches. 2022-02-11 13:52:42 +01:00
ruby-3.1.0-addr2line-DW_FORM_ref_addr.patch Upgrade to Ruby 3.0.3. 2022-02-11 13:52:42 +01:00
ruby-3.1.0-Allocate-EVP_PKEY-on-initialize.patch Update OpenSSL 3 compatibility patches. 2022-02-11 13:52:42 +01:00
ruby-3.1.0-Allow-setting-algorithm-specific-options-in-sign-and-verify.patch Update OpenSSL 3 compatibility patches. 2022-02-11 13:52:42 +01:00
ruby-3.1.0-Deprecate-PKey-set_-and-PKey-DH-EC-generate_key.patch Update OpenSSL 3 compatibility patches. 2022-02-11 13:52:42 +01:00
ruby-3.1.0-Disable-test_no_private_exp-on-OpenSSL-3.0.patch Update OpenSSL 3 compatibility patches. 2022-02-11 13:52:42 +01:00
ruby-3.1.0-Don-t-query-RubyVM-FrozenCore-for-class-path.patch Prevent segfaults running with SystemTap. 2022-02-11 13:52:42 +01:00
ruby-3.1.0-Get-rid-of-type-punning-pointer-casts.patch Adjust existing patch files to suppress Hunk lines. 2023-06-28 14:53:08 +02:00
ruby-3.1.0-Ignore-DW_FORM_ref_addr.patch Upgrade to Ruby 3.0.3. 2022-02-11 13:52:42 +01:00
ruby-3.1.0-Implement-PKey-encrypt-decrypt-sign_raw-verify_raw-and-verify_recover.patch Update OpenSSL 3 compatibility patches. 2022-02-11 13:52:42 +01:00
ruby-3.1.0-Migrate-from-the-low-level-HMAC-API-to-the-EVP-API.patch Upgrade to Ruby 3.0.7. 2024-05-13 14:23:34 +02:00
ruby-3.1.0-Miscellaneous-changes-for-OpenSSL-3.0-support-part-2.patch Update OpenSSL 3 compatibility patches. 2022-02-11 13:52:42 +01:00
ruby-3.1.0-Miscellaneous-changes-for-OpenSSL-3.0-support.patch Upgrade to Ruby 3.0.7. 2024-05-13 14:23:34 +02:00
ruby-3.1.0-Properly-exclude-test-cases.patch Upgrade to Ruby 3.0.3. 2022-02-11 13:52:42 +01:00
ruby-3.1.0-Refactor-PEM-DER-serialization-code.patch Update OpenSSL 3 compatibility patches. 2022-02-11 13:52:42 +01:00
ruby-3.1.0-Support-GCCs-DWARF-5.patch Upgrade to Ruby 3.0.3. 2022-02-11 13:52:42 +01:00
ruby-3.1.0-test-openssl-test_digest-do-not-test-constants-for-l.patch Update OpenSSL 3 compatibility patches. 2022-02-11 13:52:42 +01:00
ruby-3.1.0-test-openssl-test_pkcs12-fix-test-failures-with-Open.patch Update OpenSSL 3 compatibility patches. 2022-02-11 13:52:42 +01:00
ruby-3.1.0-test-openssl-test_pkey-use-EC-keys-for-PKey.generate.patch Update OpenSSL 3 compatibility patches. 2022-02-11 13:52:42 +01:00
ruby-3.1.0-test-openssl-test_ssl-relax-regex-to-match-OpenSSL-s.patch Update OpenSSL 3 compatibility patches. 2022-02-11 13:52:42 +01:00
ruby-3.1.0-test-openssl-utils-remove-dup_public-helper-method.patch Update OpenSSL 3 compatibility patches. 2022-02-11 13:52:42 +01:00
ruby-3.1.0-Use-EVP-API-in-more-places.patch Upgrade to Ruby 3.0.7. 2024-05-13 14:23:34 +02:00
ruby-3.1.0-Use-high-level-EVP-interface-to-generate-parameters-and-keys.patch Upgrade to Ruby 3.0.7. 2024-05-13 14:23:34 +02:00
ruby-3.1.0-Use-mmap-for-allocating-heap-pages-in-the-GC.patch Upgrade to Ruby 3.0.7. 2024-05-13 14:23:34 +02:00
ruby-3.1.0-Use-OSSL_DECODER-to-load-encrypted-PEM-on-OpenSSL-3.0.patch Update OpenSSL 3 compatibility patches. 2022-02-11 13:52:42 +01:00
ruby-3.1.1-ossl_ocsp-use-null.patch OpenSSL test suite fixes due to disabled SHA1. 2022-08-03 10:11:30 +02:00
ruby-3.1.2-ossl-tests-replace-sha1.patch Upgrade to Ruby 3.0.7. 2024-05-13 14:23:34 +02:00
ruby-3.2.0-define-unsupported-gc-compaction-methods_generated-files.patch Undefine GC compaction and related methods for ppc64le. 2025-03-27 15:03:49 +01:00
ruby-3.2.0-define-unsupported-gc-compaction-methods-as-rb_f_notimplement.patch Undefine GC compaction and related methods for ppc64le. 2025-03-27 15:03:49 +01:00
ruby-3.2.0-Detect-compaction-support-during-runtime.patch Undefine GC compaction and related methods for ppc64le. 2025-03-27 15:03:49 +01:00
ruby-3.3.0-openssl-3.2.0-fips-enable-tests.patch Fix OpenSSL.fips_mode and OpenSSL::PKey.read in OpenSSL 3 FIPS. 2023-10-13 13:23:14 +02:00
ruby-3.3.0-openssl-3.2.0-fips-fix-pkey-dh-require-openssl.patch ssl: use ffdhe2048 from RFC 7919 as the default DH group parameter 2023-10-16 16:17:50 +02:00
ruby-3.3.0-openssl-3.2.0-fips-fix-pkey-read-in-openssl-3.patch Fix OpenSSL.fips_mode and OpenSSL::PKey.read in OpenSSL 3 FIPS. 2023-10-13 13:23:14 +02:00
ruby-3.3.0-openssl-3.2.0-fix-fips-get-set-in-openssl-3.patch Fix OpenSSL.fips_mode and OpenSSL::PKey.read in OpenSSL 3 FIPS. 2023-10-13 13:23:14 +02:00
ruby-3.3.0-test-file-utime.patch Fix File.utime test. 2023-06-28 22:15:41 +02:00
ruby-3.4.0-ruby-net-http-Renew-test-certificates.patch Upgrade to Ruby 3.0.7. 2024-05-13 14:23:34 +02:00
ruby-3.4.0-ruby-net-http-test_https.rb-fix-test_session_reuse_but_expire.patch Fix test_session_reuse_but_expire for Net::HTTPS. 2025-05-16 14:33:45 +02:00
ruby-exercise.stp RHEL 9.0.0 Alpha bootstrap 2020-10-14 21:55:41 -07:00
ruby-ext-openssl-extconf.rb-ignore-OpenSSL-version-check.patch Upgrade to Ruby 3.0.7. 2024-05-13 14:23:34 +02:00
ruby-spec-Fix-tests-on-tzdata-2022b.patch Upgrade to Ruby 3.0.7. 2024-05-13 14:23:34 +02:00
ruby.rpmlintrc Additional enhancement changes 2021-08-19 16:24:37 +02:00
ruby.spec Fix networking tests failining when only loopback network device is available. 2026-08-11 11:30:11 +02:00
rubygem-cgi-0.3.5.1-Fix-DoS-in-CGI-Cookie-parse-CVE-2025-27219.patch Fix Denial of Service in CGI::Cookie.parse. (CVE-2025-27219) 2025-04-15 09:28:46 +02:00
rubygem-cgi-0.3.5.1-Fix-ReDoS-in-CGI-CVE-2025-27220.patch Fix ReDoS in CGI::Util#escapeElement. (CVE-2025-27220) 2025-04-15 09:29:21 +02:00
rubygem-erb-4.0.3.1-Fix-arbitrary-code-execution-via-deserialization-bypass-CVE-2026-41316.patch Fix arbitrary code execution via deserialization bypass in ERB. 2026-05-25 14:58:02 +02:00
rubygem-irb-1.4.2-Fix-already-initialized-constant-messages-from-require-in-scripts.patch Fix printing warnings when using IRB from a script. 2025-03-27 15:03:49 +01:00
rubygem-net-imap-0.3.10-Fix-Information-disclosure-via-man-in-the-middle-attack-bypassing-TLS-CVE-2026-42246.patch Fix information disclosure via MITM attack bypassing TLS in net-imap. 2026-07-09 11:38:02 +02:00
rubygem-net-imap-0.4.24-Fix-IMAP-Command-Injection-via-Symbol-Arguments-CVE-2026-42258.patch Fix command injection via Symbol arguments in net-imap. 2026-07-09 11:39:15 +02:00
rubygem-openssl-3.3.0-Only-CSR-version-1-encoded-as-0-is-allowed-by-PKIX.patch Remove test cases where invalid CSR version is used. 2025-05-16 14:33:45 +02:00
rubygem-openssl-3.3.0-test_asn1.rb-Remove-the-assertions-of-the-time.patch Fix OpenSSL ASN1 assertions, they are invalid without seconds. 2025-05-16 14:33:45 +02:00
rubygem-rexml-3.3.9-Fix-ReDoS-CVE-2024-49761.patch Fix REXML ReDoS vulnerability. (CVE-2024-49761) 2024-12-02 16:17:33 +01:00
rubygems-3.2.30-Provide-distinguished-name-which-will-be-correctly-p.patch Update OpenSSL 3 compatibility patches. 2022-02-11 13:52:42 +01:00
rubygems-3.2.33-Fix-loading-operating_system-rb-customizations-too-late.patch Update OpenSSL 3 compatibility patches. 2022-02-11 13:52:42 +01:00
rubygems-3.3.1-Fix-compatibility-with-OpenSSL3.0.patch Update OpenSSL 3 compatibility patches. 2022-02-11 13:52:42 +01:00
rubygems.attr RHEL 9.0.0 Alpha bootstrap 2020-10-14 21:55:41 -07:00
rubygems.con RHEL 9.0.0 Alpha bootstrap 2020-10-14 21:55:41 -07:00
rubygems.prov RHEL 9.0.0 Alpha bootstrap 2020-10-14 21:55:41 -07:00
rubygems.req RHEL 9.0.0 Alpha bootstrap 2020-10-14 21:55:41 -07:00
sources Upgrade to Ruby 3.0.7. 2024-05-13 14:23:34 +02:00
test_abrt.rb RHEL 9.0.0 Alpha bootstrap 2020-10-14 21:55:41 -07:00
test_openssl_fips.rb Fix OpenSSL.fips_mode and OpenSSL::PKey.read in OpenSSL 3 FIPS. 2023-10-13 13:23:14 +02:00
test_systemtap.rb RHEL 9.0.0 Alpha bootstrap 2020-10-14 21:55:41 -07:00