diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_fiber.rb | 2 | ||||
-rw-r--r-- | test/ruby/test_io.rb | 6 | ||||
-rw-r--r-- | test/ruby/test_jit.rb | 2 | ||||
-rw-r--r-- | test/ruby/test_optimization.rb | 2 | ||||
-rw-r--r-- | test/ruby/test_process.rb | 2 | ||||
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 8 | ||||
-rw-r--r-- | test/ruby/test_rubyvm_jit.rb | 24 | ||||
-rw-r--r-- | test/ruby/test_settracefunc.rb | 2 | ||||
-rw-r--r-- | test/ruby/test_thread.rb | 4 |
9 files changed, 26 insertions, 26 deletions
diff --git a/test/ruby/test_fiber.rb b/test/ruby/test_fiber.rb index a0fd4a7491..3aad5dd09c 100644 --- a/test/ruby/test_fiber.rb +++ b/test/ruby/test_fiber.rb @@ -34,7 +34,7 @@ class TestFiber < Test::Unit::TestCase end def test_many_fibers - skip 'This is unstable on GitHub Actions --jit-wait. TODO: debug it' if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? + skip 'This is unstable on GitHub Actions --jit-wait. TODO: debug it' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? max = 1000 assert_equal(max, max.times{ Fiber.new{} diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 71a8911fbd..b46777df5f 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -655,7 +655,7 @@ class TestIO < Test::Unit::TestCase if have_nonblock? def test_copy_stream_no_busy_wait - skip "MJIT has busy wait on GC. This sometimes fails with --jit." if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? + skip "MJIT has busy wait on GC. This sometimes fails with --jit." if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? skip "multiple threads already active" if Thread.list.size > 1 msg = 'r58534 [ruby-core:80969] [Backport #13533]' @@ -1610,7 +1610,7 @@ class TestIO < Test::Unit::TestCase end if have_nonblock? def test_read_nonblock_no_exceptions - skip '[ruby-core:90895] MJIT worker may leave fd open in a forked child' if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # TODO: consider acquiring GVL from MJIT worker. + skip '[ruby-core:90895] MJIT worker may leave fd open in a forked child' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # TODO: consider acquiring GVL from MJIT worker. with_pipe {|r, w| assert_equal :wait_readable, r.read_nonblock(4096, exception: false) w.puts "HI!" @@ -2258,7 +2258,7 @@ class TestIO < Test::Unit::TestCase def test_autoclose_true_closed_by_finalizer # http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1465760 # http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1469765 - skip 'this randomly fails with MJIT' if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? + skip 'this randomly fails with MJIT' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? feature2250 = '[ruby-core:26222]' pre = 'ft2250' diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb index 50ef1195d5..07ac76210d 100644 --- a/test/ruby/test_jit.rb +++ b/test/ruby/test_jit.rb @@ -1108,7 +1108,7 @@ class TestJIT < Test::Unit::TestCase def test_mjit_pause_wait assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: '', success_count: 0, min_calls: 1) begin; - RubyVM::JIT.pause + RubyVM::MJIT.pause proc {}.call end; end diff --git a/test/ruby/test_optimization.rb b/test/ruby/test_optimization.rb index a834996788..43795d150c 100644 --- a/test/ruby/test_optimization.rb +++ b/test/ruby/test_optimization.rb @@ -510,7 +510,7 @@ class TestRubyOptimization < Test::Unit::TestCase end def test_tailcall_not_to_grow_stack - skip 'currently JIT-ed code always creates a new stack frame' if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? + skip 'currently JIT-ed code always creates a new stack frame' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? bug16161 = '[ruby-core:94881]' tailcall("#{<<-"begin;"}\n#{<<~"end;"}") diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 636871f822..bd2413b74c 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -1718,7 +1718,7 @@ class TestProcess < Test::Unit::TestCase Process.wait pid assert_send [sig_r, :wait_readable, 5], 'self-pipe not readable' end - if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # checking -DMJIT_FORCE_ENABLE. It may trigger extra SIGCHLD. + if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # checking -DMJIT_FORCE_ENABLE. It may trigger extra SIGCHLD. assert_equal [true], signal_received.uniq, "[ruby-core:19744]" else assert_equal [true], signal_received, "[ruby-core:19744]" diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index f6c8b4f859..5018a38152 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -10,7 +10,7 @@ class TestRubyOptions < Test::Unit::TestCase def self.yjit_enabled? = defined?(RubyVM::YJIT.enabled?) && RubyVM::YJIT.enabled? NO_JIT_DESCRIPTION = - if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # checking -DMJIT_FORCE_ENABLE + if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # checking -DMJIT_FORCE_ENABLE RUBY_DESCRIPTION.sub(/\+MJIT /, '') elsif yjit_enabled? # checking -DYJIT_FORCE_ENABLE RUBY_DESCRIPTION.sub(/\+YJIT /, '') @@ -146,7 +146,7 @@ class TestRubyOptions < Test::Unit::TestCase def test_verbose assert_in_out_err([{'RUBY_YJIT_ENABLE' => nil}, "-vve", ""]) do |r, e| assert_match(VERSION_PATTERN, r[0]) - if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? && !mjit_force_enabled? # checking -DMJIT_FORCE_ENABLE + if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? && !mjit_force_enabled? # checking -DMJIT_FORCE_ENABLE assert_equal(NO_JIT_DESCRIPTION, r[0]) elsif self.class.yjit_enabled? && !yjit_force_enabled? # checking -DYJIT_FORCE_ENABLE assert_equal(NO_JIT_DESCRIPTION, r[0]) @@ -214,7 +214,7 @@ class TestRubyOptions < Test::Unit::TestCase assert_match(VERSION_PATTERN, r[0]) if ENV['RUBY_YJIT_ENABLE'] == '1' assert_equal(NO_JIT_DESCRIPTION, r[0]) - elsif defined?(RubyVM::JIT) && RubyVM::JIT.enabled? || self.class.yjit_enabled? # checking -D(M|Y)JIT_FORCE_ENABLE + elsif defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? || self.class.yjit_enabled? # checking -D(M|Y)JIT_FORCE_ENABLE assert_equal(EnvUtil.invoke_ruby(['-e', 'print RUBY_DESCRIPTION'], '', true).first, r[0]) else assert_equal(RUBY_DESCRIPTION, r[0]) @@ -255,7 +255,7 @@ class TestRubyOptions < Test::Unit::TestCase ].each do |args| assert_in_out_err([env] + args) do |r, e| assert_match(VERSION_PATTERN_WITH_JIT, r[0]) - if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # checking -DMJIT_FORCE_ENABLE + if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # checking -DMJIT_FORCE_ENABLE assert_equal(RUBY_DESCRIPTION, r[0]) else assert_equal(EnvUtil.invoke_ruby([env, '--mjit', '-e', 'print RUBY_DESCRIPTION'], '', true).first, r[0]) diff --git a/test/ruby/test_rubyvm_jit.rb b/test/ruby/test_rubyvm_jit.rb index 2104ce3d18..a3558d791c 100644 --- a/test/ruby/test_rubyvm_jit.rb +++ b/test/ruby/test_rubyvm_jit.rb @@ -20,13 +20,13 @@ class TestRubyVMJIT < Test::Unit::TestCase eval("def mjit#{i}; end; mjit#{i}") i += 1 end - print RubyVM::JIT.pause - print RubyVM::JIT.pause + print RubyVM::MJIT.pause + print RubyVM::MJIT.pause while i < 10 eval("def mjit#{i}; end; mjit#{i}") i += 1 end - print RubyVM::JIT.pause # no JIT here + print RubyVM::MJIT.pause # no JIT here EOS assert_equal('truefalsefalse', out) assert_equal( @@ -39,7 +39,7 @@ class TestRubyVMJIT < Test::Unit::TestCase out, err = eval_with_jit(<<~'EOS', verbose: 1, min_calls: 1, wait: false) def a() end; a def b() end; b - RubyVM::JIT.pause + RubyVM::MJIT.pause EOS assert_equal( 2, err.scan(/#{JITSupport::JIT_SUCCESS_PREFIX}/).size, @@ -58,7 +58,7 @@ class TestRubyVMJIT < Test::Unit::TestCase eval("def mjit#{i}; end; mjit#{i}") i += 1 end - print RubyVM::JIT.pause + print RubyVM::MJIT.pause EOS assert_equal('true', out) end @@ -70,8 +70,8 @@ class TestRubyVMJIT < Test::Unit::TestCase eval("def mjit#{i}; end; mjit#{i}") i += 1 end - print RubyVM::JIT.pause(wait: false) - print RubyVM::JIT.pause(wait: false) + print RubyVM::MJIT.pause(wait: false) + print RubyVM::MJIT.pause(wait: false) EOS assert_equal('truefalse', out) assert_equal(true, err.scan(/#{JITSupport::JIT_SUCCESS_PREFIX}/).size < 10) @@ -79,11 +79,11 @@ class TestRubyVMJIT < Test::Unit::TestCase def test_resume out, err = eval_with_jit(<<~'EOS', verbose: 1, min_calls: 1, wait: false) - print RubyVM::JIT.resume - print RubyVM::JIT.pause - print RubyVM::JIT.resume - print RubyVM::JIT.resume - print RubyVM::JIT.pause + print RubyVM::MJIT.resume + print RubyVM::MJIT.pause + print RubyVM::MJIT.resume + print RubyVM::MJIT.resume + print RubyVM::MJIT.pause EOS assert_equal('falsetruetruefalsetrue', out) assert_equal(0, err.scan(/#{JITSupport::JIT_SUCCESS_PREFIX}/).size) diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index f623d87506..c25debb38e 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -2106,7 +2106,7 @@ CODE Thread.pass until t.status == 'sleep' # When MJIT thread exists, t.status becomes 'sleep' even if it does not reach m2t_q.pop. # This sleep forces it to reach m2t_q.pop for --jit-wait. - sleep 1 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? + sleep 1 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? t.add_trace_func proc{|ev, file, line, *args| if file == __FILE__ diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index 7b37aeb202..ddfeb8b7a8 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -317,7 +317,7 @@ class TestThread < Test::Unit::TestCase s += 1 end Thread.pass until t.stop? - sleep 1 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # t.stop? behaves unexpectedly with --jit-wait + sleep 1 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # t.stop? behaves unexpectedly with --jit-wait assert_equal(1, s) t.wakeup Thread.pass while t.alive? @@ -1369,7 +1369,7 @@ q.pop opts = { timeout: 5, timeout_error: nil } # prevent SIGABRT from slow shutdown with MJIT - opts[:reprieve] = 3 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? + opts[:reprieve] = 3 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? assert_normal_exit(<<-_end, '[Bug #8996]', **opts) Thread.report_on_exception = false |