summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_fiber.rb2
-rw-r--r--test/ruby/test_io.rb6
-rw-r--r--test/ruby/test_jit.rb2
-rw-r--r--test/ruby/test_optimization.rb2
-rw-r--r--test/ruby/test_process.rb2
-rw-r--r--test/ruby/test_rubyoptions.rb8
-rw-r--r--test/ruby/test_rubyvm_jit.rb (renamed from test/ruby/test_rubyvm_mjit.rb)26
-rw-r--r--test/ruby/test_settracefunc.rb2
-rw-r--r--test/ruby/test_thread.rb4
9 files changed, 27 insertions, 27 deletions
diff --git a/test/ruby/test_fiber.rb b/test/ruby/test_fiber.rb
index ff4658a20b..a5e35c0fd6 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::MJIT) && RubyVM::MJIT.enabled?
+ skip 'This is unstable on GitHub Actions --jit-wait. TODO: debug it' if defined?(RubyVM::JIT) && RubyVM::JIT.enabled?
max = 10_000
assert_equal(max, max.times{
Fiber.new{}
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 9f9318eaf7..42149ac32a 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -607,7 +607,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::MJIT) && RubyVM::MJIT.enabled?
+ skip "MJIT has busy wait on GC. This sometimes fails with --jit." if defined?(RubyVM::JIT) && RubyVM::JIT.enabled?
skip "multiple threads already active" if Thread.list.size > 1
msg = 'r58534 [ruby-core:80969] [Backport #13533]'
@@ -1562,7 +1562,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::MJIT) && RubyVM::MJIT.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::JIT) && RubyVM::JIT.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!"
@@ -2210,7 +2210,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::MJIT) && RubyVM::MJIT.enabled?
+ skip 'this randomly fails with MJIT' if defined?(RubyVM::JIT) && RubyVM::JIT.enabled?
feature2250 = '[ruby-core:26222]'
pre = 'ft2250'
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb
index 3bc4a871a1..54f9698afa 100644
--- a/test/ruby/test_jit.rb
+++ b/test/ruby/test_jit.rb
@@ -1085,7 +1085,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::MJIT.pause
+ RubyVM::JIT.pause
proc {}.call
end;
end
diff --git a/test/ruby/test_optimization.rb b/test/ruby/test_optimization.rb
index d0790c7463..b0090d654a 100644
--- a/test/ruby/test_optimization.rb
+++ b/test/ruby/test_optimization.rb
@@ -452,7 +452,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::MJIT) && RubyVM::MJIT.enabled?
+ skip 'currently JIT-ed code always creates a new stack frame' if defined?(RubyVM::JIT) && RubyVM::JIT.enabled?
bug16161 = '[ruby-core:94881]'
tailcall("#{<<-"begin;"}\n#{<<~"end;"}")
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index d1b9d8a478..33144aa62f 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -1706,7 +1706,7 @@ class TestProcess < Test::Unit::TestCase
Process.wait pid
assert_send [sig_r, :wait_readable, 5], 'self-pipe not readable'
end
- if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # checking -DMJIT_FORCE_ENABLE. It may trigger extra SIGCHLD.
+ if defined?(RubyVM::JIT) && RubyVM::JIT.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 b7831948f0..d860bf4a15 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -8,7 +8,7 @@ require_relative '../lib/jit_support'
class TestRubyOptions < Test::Unit::TestCase
NO_JIT_DESCRIPTION =
- if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # checking -DMJIT_FORCE_ENABLE
+ if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # checking -DMJIT_FORCE_ENABLE
RUBY_DESCRIPTION.sub(/\+JIT /, '')
else
RUBY_DESCRIPTION
@@ -128,7 +128,7 @@ class TestRubyOptions < Test::Unit::TestCase
def test_verbose
assert_in_out_err(["-vve", ""]) do |r, e|
assert_match(VERSION_PATTERN, r[0])
- if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? && !mjit_force_enabled? # checking -DMJIT_FORCE_ENABLE
+ if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? && !mjit_force_enabled? # checking -DMJIT_FORCE_ENABLE
assert_equal(NO_JIT_DESCRIPTION, r[0])
else
assert_equal(RUBY_DESCRIPTION, r[0])
@@ -191,7 +191,7 @@ class TestRubyOptions < Test::Unit::TestCase
def test_version
assert_in_out_err(%w(--version)) do |r, e|
assert_match(VERSION_PATTERN, r[0])
- if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # checking -DMJIT_FORCE_ENABLE
+ if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # checking -DMJIT_FORCE_ENABLE
assert_equal(EnvUtil.invoke_ruby(['-e', 'print RUBY_DESCRIPTION'], '', true).first, r[0])
else
assert_equal(RUBY_DESCRIPTION, r[0])
@@ -221,7 +221,7 @@ class TestRubyOptions < Test::Unit::TestCase
].each do |args|
assert_in_out_err(args) do |r, e|
assert_match(VERSION_PATTERN_WITH_JIT, r[0])
- if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # checking -DMJIT_FORCE_ENABLE
+ if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # checking -DMJIT_FORCE_ENABLE
assert_equal(RUBY_DESCRIPTION, r[0])
else
assert_equal(EnvUtil.invoke_ruby(['--jit', '-e', 'print RUBY_DESCRIPTION'], '', true).first, r[0])
diff --git a/test/ruby/test_rubyvm_mjit.rb b/test/ruby/test_rubyvm_jit.rb
index ef7475670c..2104ce3d18 100644
--- a/test/ruby/test_rubyvm_mjit.rb
+++ b/test/ruby/test_rubyvm_jit.rb
@@ -4,7 +4,7 @@ require_relative '../lib/jit_support'
return if RbConfig::CONFIG["MJIT_SUPPORT"] == 'no'
-class TestRubyVMMJIT < Test::Unit::TestCase
+class TestRubyVMJIT < Test::Unit::TestCase
include JITSupport
def setup
@@ -20,13 +20,13 @@ class TestRubyVMMJIT < Test::Unit::TestCase
eval("def mjit#{i}; end; mjit#{i}")
i += 1
end
- print RubyVM::MJIT.pause
- print RubyVM::MJIT.pause
+ print RubyVM::JIT.pause
+ print RubyVM::JIT.pause
while i < 10
eval("def mjit#{i}; end; mjit#{i}")
i += 1
end
- print RubyVM::MJIT.pause # no JIT here
+ print RubyVM::JIT.pause # no JIT here
EOS
assert_equal('truefalsefalse', out)
assert_equal(
@@ -39,7 +39,7 @@ class TestRubyVMMJIT < 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::MJIT.pause
+ RubyVM::JIT.pause
EOS
assert_equal(
2, err.scan(/#{JITSupport::JIT_SUCCESS_PREFIX}/).size,
@@ -58,7 +58,7 @@ class TestRubyVMMJIT < Test::Unit::TestCase
eval("def mjit#{i}; end; mjit#{i}")
i += 1
end
- print RubyVM::MJIT.pause
+ print RubyVM::JIT.pause
EOS
assert_equal('true', out)
end
@@ -70,8 +70,8 @@ class TestRubyVMMJIT < Test::Unit::TestCase
eval("def mjit#{i}; end; mjit#{i}")
i += 1
end
- print RubyVM::MJIT.pause(wait: false)
- print RubyVM::MJIT.pause(wait: false)
+ print RubyVM::JIT.pause(wait: false)
+ print RubyVM::JIT.pause(wait: false)
EOS
assert_equal('truefalse', out)
assert_equal(true, err.scan(/#{JITSupport::JIT_SUCCESS_PREFIX}/).size < 10)
@@ -79,11 +79,11 @@ class TestRubyVMMJIT < Test::Unit::TestCase
def test_resume
out, err = eval_with_jit(<<~'EOS', verbose: 1, min_calls: 1, wait: false)
- print RubyVM::MJIT.resume
- print RubyVM::MJIT.pause
- print RubyVM::MJIT.resume
- print RubyVM::MJIT.resume
- print RubyVM::MJIT.pause
+ print RubyVM::JIT.resume
+ print RubyVM::JIT.pause
+ print RubyVM::JIT.resume
+ print RubyVM::JIT.resume
+ print RubyVM::JIT.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 7821a221dc..1d16b2e154 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -1963,7 +1963,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
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::MJIT) && RubyVM::MJIT.enabled?
+ sleep 1 if defined?(RubyVM::JIT) && RubyVM::JIT.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 3852cb7020..6005e5b001 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -309,7 +309,7 @@ class TestThread < Test::Unit::TestCase
s += 1
end
Thread.pass until t.stop?
- sleep 1 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # t.stop? behaves unexpectedly with --jit-wait
+ sleep 1 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # t.stop? behaves unexpectedly with --jit-wait
assert_equal(1, s)
t.wakeup
Thread.pass while t.alive?
@@ -1338,7 +1338,7 @@ q.pop
opts = { timeout: 5, timeout_error: nil }
# prevent SIGABRT from slow shutdown with MJIT
- opts[:reprieve] = 3 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
+ opts[:reprieve] = 3 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled?
assert_normal_exit(<<-_end, '[Bug #8996]', **opts)
Thread.report_on_exception = false