diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2022-06-14 22:40:49 -0700 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2022-06-14 22:42:09 -0700 |
commit | 46706e7808b897703f759d4d96b65fdf4b2bf9d0 (patch) | |
tree | c78499ebdaa0306b529c2ac0839c2c4bfe114c9e | |
parent | 788a5e14faee9a2a9b32afa9326b7b91a46def33 (diff) |
MJIT: Add a test for Process.waitall handling
-rw-r--r-- | test/ruby/test_rubyvm_mjit.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_rubyvm_mjit.rb b/test/ruby/test_rubyvm_mjit.rb index 94b773c4e6..92733a2b15 100644 --- a/test/ruby/test_rubyvm_mjit.rb +++ b/test/ruby/test_rubyvm_mjit.rb @@ -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 |