Skip to content

Commit

Permalink
[Bug #20184] Test for low memory
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Jan 16, 2024
1 parent 6a1bf4c commit 0abbab9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/ruby/test_process.rb
Expand Up @@ -2838,4 +2838,11 @@ def test_concurrent_group_and_pid_wait
[t1, t2, t3].each { _1&.join rescue nil }
[long_rpipe, long_wpipe, short_rpipe, short_wpipe].each { _1&.close rescue nil }
end if defined?(fork)

def test_low_memory_startup
omit "JIT enabled" if %w[YJIT RJIT].any? {|n| RubyVM.const_defined?(n) and RubyVM.const_get(n).enabled?}
(25..27).each {|i| as = 1<<i; assert_normal_exit("", "AS: %x" % as, rlimit_as: as)}
rescue ArgumentError, Errno::EINVAL => e
omit e.message
end
end

0 comments on commit 0abbab9

Please sign in to comment.