From fd513df1764b012c6fefbc3e5b741d81517b9654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 21 May 2024 10:19:42 +0200 Subject: [PATCH] Fix Zlib test failures on s390x due to HW acceleration Related: RHEL-37877 --- ruby.spec | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ruby.spec b/ruby.spec index 4635f3d..c00635e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -911,6 +911,18 @@ DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|test\|loaded_featur # https://bugs.ruby-lang.org/issues/14175 sed -i '/def test_mdns_each_address$/,/^ end$/ s/^/#/' test/resolv/test_mdns.rb +# Provide workaround for s390x zlib errors in tests on RHEL 8. +# The library works, but there seems to be chip acceleration used +# resulting in failing asserts against hardcoded values that were +# created for a different algorithm than is the default on that platform. +# Fix taken from: +# https://github.com/ruby/zlib/commit/280a1b5905d752af25e9f09e6511388cb4260eb2 +%ifarch s390x + # Force chip acceleration off. + # https://www.ibm.com/docs/en/linux-on-systems?topic=o-applications-2 + export DFLTCC=0 +%endif + # For now, disable test incompatible with OpenSSL 1.1.1: # https://github.com/rubygems/rubygems/issues/2388 DISABLE_TESTS="$DISABLE_TESTS -n !/test_do_not_allow_invalid_client_cert_auth_connection/"