mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
MJIT: Add a test for Process.waitall handling
This commit is contained in:
parent
788a5e14fa
commit
46706e7808
1 changed files with 13 additions and 0 deletions
|
@ -51,6 +51,19 @@ class TestRubyVMMJIT < Test::Unit::TestCase
|
|||
) unless RUBY_PLATFORM.match?(/mswin|mingw/) # compaction is not supported on Windows yet
|
||||
end
|
||||
|
||||
def test_pause_after_waitall
|
||||
out, err = eval_with_jit(<<~'EOS', verbose: 1, min_calls: 1, wait: false)
|
||||
def test() = nil
|
||||
test
|
||||
Process.waitall
|
||||
print RubyVM::MJIT.pause
|
||||
EOS
|
||||
assert_equal(
|
||||
1, err.scan(/#{JITSupport::JIT_SUCCESS_PREFIX}/).size,
|
||||
"unexpected stdout:\n```\n#{out}```\n\nstderr:\n```\n#{err}```",
|
||||
)
|
||||
end
|
||||
|
||||
def test_pause_does_not_hang_on_full_units
|
||||
out, _ = eval_with_jit(<<~'EOS', verbose: 1, min_calls: 1, max_cache: 10, wait: false)
|
||||
i = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue