From 2f4fe76eff0a8c6ab7a1d2fb845453acfc3cb206 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Thu, 22 Feb 2024 14:34:19 -0800 Subject: Skip under_gc_compact_stress on s390x (#10073) --- test/ruby/test_array.rb | 1 + test/ruby/test_enumerator.rb | 2 ++ test/ruby/test_method.rb | 1 + test/ruby/test_regexp.rb | 3 +++ test/ruby/test_string.rb | 5 +++++ test/ruby/test_symbol.rb | 1 + test/ruby/test_weakkeymap.rb | 1 + test/ruby/test_weakmap.rb | 1 + 8 files changed, 15 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index 97e2fa3de8..e40651eb8e 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -1703,6 +1703,7 @@ class TestArray < Test::Unit::TestCase end def test_slice_gc_compact_stress + omit "compaction doesn't work well on s390x" if RUBY_PLATFORM =~ /s390x/ # https://github.com/ruby/ruby/pull/5077 EnvUtil.under_gc_compact_stress { assert_equal([1, 2, 3, 4, 5], (0..10).to_a[1, 5]) } EnvUtil.under_gc_compact_stress do a = [0, 1, 2, 3, 4, 5] diff --git a/test/ruby/test_enumerator.rb b/test/ruby/test_enumerator.rb index 11cfe69864..825c191d87 100644 --- a/test/ruby/test_enumerator.rb +++ b/test/ruby/test_enumerator.rb @@ -128,6 +128,7 @@ class TestEnumerator < Test::Unit::TestCase end def test_with_index_under_gc_compact_stress + omit "compaction doesn't work well on s390x" if RUBY_PLATFORM =~ /s390x/ # https://github.com/ruby/ruby/pull/5077 EnvUtil.under_gc_compact_stress do assert_equal([[1, 0], [2, 1], [3, 2]], @obj.to_enum(:foo, 1, 2, 3).with_index.to_a) assert_equal([[1, 5], [2, 6], [3, 7]], @obj.to_enum(:foo, 1, 2, 3).with_index(5).to_a) @@ -863,6 +864,7 @@ class TestEnumerator < Test::Unit::TestCase end def test_lazy_chain_under_gc_compact_stress + omit "compaction doesn't work well on s390x" if RUBY_PLATFORM =~ /s390x/ # https://github.com/ruby/ruby/pull/5077 EnvUtil.under_gc_compact_stress do ea = (10..).lazy.select(&:even?).take(10) ed = (20..).lazy.select(&:odd?) diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index 90635bc5e5..423ebd391a 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -451,6 +451,7 @@ class TestMethod < Test::Unit::TestCase end def test_clone_under_gc_compact_stress + omit "compaction doesn't work well on s390x" if RUBY_PLATFORM =~ /s390x/ # https://github.com/ruby/ruby/pull/5077 EnvUtil.under_gc_compact_stress do o = Object.new def o.foo; :foo; end diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index 573344e717..ec9bcc34d8 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -73,6 +73,7 @@ class TestRegexp < Test::Unit::TestCase end def test_to_s_under_gc_compact_stress + omit "compaction doesn't work well on s390x" if RUBY_PLATFORM =~ /s390x/ # https://github.com/ruby/ruby/pull/5077 EnvUtil.under_gc_compact_stress do str = "abcd\u3042" [:UTF_16BE, :UTF_16LE, :UTF_32BE, :UTF_32LE].each do |es| @@ -470,6 +471,7 @@ class TestRegexp < Test::Unit::TestCase end def test_inspect_under_gc_compact_stress + omit "compaction doesn't work well on s390x" if RUBY_PLATFORM =~ /s390x/ # https://github.com/ruby/ruby/pull/5077 EnvUtil.under_gc_compact_stress do assert_equal('/(?-mix:\\/)|/', Regexp.union(/\//, "").inspect) end @@ -891,6 +893,7 @@ class TestRegexp < Test::Unit::TestCase end def test_match_under_gc_compact_stress + omit "compaction doesn't work well on s390x" if RUBY_PLATFORM =~ /s390x/ # https://github.com/ruby/ruby/pull/5077 EnvUtil.under_gc_compact_stress do m = /(?.)(?[^aeiou])?(?.+)/.match("hoge\u3042") assert_equal("h", m.match(:foo)) diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index 85a72b09cc..149c128ed4 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -909,6 +909,7 @@ CODE end def test_undump_gc_compact_stress + omit "compaction doesn't work well on s390x" if RUBY_PLATFORM =~ /s390x/ # https://github.com/ruby/ruby/pull/5077 a = S("Test") << 1 << 2 << 3 << 9 << 13 << 10 EnvUtil.under_gc_compact_stress do assert_equal(a, S('"Test\\x01\\x02\\x03\\t\\r\\n"').undump) @@ -1284,6 +1285,7 @@ CODE end def test_gsub_gc_compact_stress + omit "compaction doesn't work well on s390x" if RUBY_PLATFORM =~ /s390x/ # https://github.com/ruby/ruby/pull/5077 EnvUtil.under_gc_compact_stress { assert_equal(S("hll"), S("hello").gsub(/([aeiou])/, S('<\1>'))) } end @@ -1331,6 +1333,7 @@ CODE end def test_gsub_bang_gc_compact_stress + omit "compaction doesn't work well on s390x" if RUBY_PLATFORM =~ /s390x/ # https://github.com/ruby/ruby/pull/5077 EnvUtil.under_gc_compact_stress do a = S("hello") a.gsub!(/([aeiou])/, S('<\1>')) @@ -1672,6 +1675,7 @@ CODE end def test_scan_gc_compact_stress + omit "compaction doesn't work well on s390x" if RUBY_PLATFORM =~ /s390x/ # https://github.com/ruby/ruby/pull/5077 EnvUtil.under_gc_compact_stress { assert_equal([["1a"], ["2b"], ["3c"]], S("1a2b3c").scan(/(\d.)/)) } end @@ -2103,6 +2107,7 @@ CODE end def test_sub_gc_compact_stress + omit "compaction doesn't work well on s390x" if RUBY_PLATFORM =~ /s390x/ # https://github.com/ruby/ruby/pull/5077 EnvUtil.under_gc_compact_stress do m = /&(?.*?);/.match(S("aaa & yyy")) assert_equal("amp", m["foo"]) diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb index 7f75ecd90e..67a8303c54 100644 --- a/test/ruby/test_symbol.rb +++ b/test/ruby/test_symbol.rb @@ -119,6 +119,7 @@ class TestSymbol < Test::Unit::TestCase end def test_inspect_under_gc_compact_stress + omit "compaction doesn't work well on s390x" if RUBY_PLATFORM =~ /s390x/ # https://github.com/ruby/ruby/pull/5077 EnvUtil.under_gc_compact_stress do assert_inspect_evaled(':testing') end diff --git a/test/ruby/test_weakkeymap.rb b/test/ruby/test_weakkeymap.rb index 799cee2d75..1718ccf06b 100644 --- a/test/ruby/test_weakkeymap.rb +++ b/test/ruby/test_weakkeymap.rb @@ -124,6 +124,7 @@ class TestWeakKeyMap < Test::Unit::TestCase end def test_gc_compact_stress + omit "compaction doesn't work well on s390x" if RUBY_PLATFORM =~ /s390x/ # https://github.com/ruby/ruby/pull/5077 EnvUtil.under_gc_compact_stress { ObjectSpace::WeakKeyMap.new } end diff --git a/test/ruby/test_weakmap.rb b/test/ruby/test_weakmap.rb index 0371afa77a..97d7197dbb 100644 --- a/test/ruby/test_weakmap.rb +++ b/test/ruby/test_weakmap.rb @@ -238,6 +238,7 @@ class TestWeakMap < Test::Unit::TestCase end def test_gc_compact_stress + omit "compaction doesn't work well on s390x" if RUBY_PLATFORM =~ /s390x/ # https://github.com/ruby/ruby/pull/5077 EnvUtil.under_gc_compact_stress { ObjectSpace::WeakMap.new } end -- cgit v1.2.3