diff options
author | Samuel Williams <[email protected]> | 2025-04-18 01:19:05 +0900 |
---|---|---|
committer | GitHub <[email protected]> | 2025-04-17 16:19:05 +0000 |
commit | 06a7b3c14453b35ff530b3a06c134193dc25207e (patch) | |
tree | bc285cedb4abf103ae4ddeee9e439344a8386be0 /test/-ext-/stack/test_stack_overflow.rb | |
parent | c4ae6cb5005cfa53be0af466a5619e7455c15744 (diff) |
Only test on known good platforms. (#13123)
Notes
Notes:
Merged-By: ioquatix <[email protected]>
Diffstat (limited to 'test/-ext-/stack/test_stack_overflow.rb')
-rw-r--r-- | test/-ext-/stack/test_stack_overflow.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/-ext-/stack/test_stack_overflow.rb b/test/-ext-/stack/test_stack_overflow.rb index eadf6d292a..8eddec6ab5 100644 --- a/test/-ext-/stack/test_stack_overflow.rb +++ b/test/-ext-/stack/test_stack_overflow.rb @@ -2,9 +2,15 @@ require 'test/unit' class Test_StackOverflow < Test::Unit::TestCase - def test_proc_overflow - omit("Windows stack overflow handling is missing") if RUBY_PLATFORM =~ /mswin|win32|mingw/ + def setup + omit "Stack overflow tests are not supported on this platform: #{RUBY_PLATFORM.inspect}" unless RUBY_PLATFORM =~ /x86_64-linux|darwin/ + require '-test-/stack' + + omit "Stack overflow tests are not supported with ASAN" if Thread.asan? + end + + def test_overflow assert_separately([], <<~RUBY) # GC may try to scan the top of the stack and cause a SEGV. GC.disable @@ -17,8 +23,6 @@ class Test_StackOverflow < Test::Unit::TestCase end def test_thread_stack_overflow - omit("Windows stack overflow handling is missing") if RUBY_PLATFORM =~ /mswin|win32|mingw/ - assert_separately([], <<~RUBY) require '-test-/stack' GC.disable @@ -35,8 +39,6 @@ class Test_StackOverflow < Test::Unit::TestCase end def test_fiber_stack_overflow - omit("Windows stack overflow handling is missing") if RUBY_PLATFORM =~ /mswin|win32|mingw/ - assert_separately([], <<~RUBY) require '-test-/stack' GC.disable |