summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2021-01-13 22:36:45 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2021-01-13 22:46:51 -0800
commite1fee7f949cb6719122672fa1081c60984a5339f (patch)
tree3a851fdfcdbf395f5783aecaacf521308ddfd74e /test
parent4d13f3e9da6298a1f8154def2e341ecb7c5fe116 (diff)
Rename RubyVM::MJIT to RubyVM::JIT
because the name "MJIT" is an internal code name, it's inconsistent with --jit while they are related to each other, and I want to discourage future JIT implementation-specific (e.g. MJIT-specific) APIs by this rename. [Feature #17490]
Diffstat (limited to 'test')
-rw-r--r--test/-ext-/bug_reporter/test_bug_reporter.rb2
-rw-r--r--test/csv/parse/test_general.rb2
-rw-r--r--test/drb/drbtest.rb2
-rw-r--r--test/lib/jit_support.rb2
-rw-r--r--test/net/ftp/test_ftp.rb34
-rw-r--r--test/net/http/test_httpresponse.rb2
-rw-r--r--test/net/smtp/test_smtp.rb2
-rw-r--r--test/reline/test_within_pipe.rb2
-rw-r--r--test/rinda/test_rinda.rb4
-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
-rw-r--r--test/rubygems/test_gem_stream_ui.rb2
-rw-r--r--test/socket/test_socket.rb2
20 files changed, 55 insertions, 55 deletions
diff --git a/test/-ext-/bug_reporter/test_bug_reporter.rb b/test/-ext-/bug_reporter/test_bug_reporter.rb
index 6b8e1754a7..ac6d92bb67 100644
--- a/test/-ext-/bug_reporter/test_bug_reporter.rb
+++ b/test/-ext-/bug_reporter/test_bug_reporter.rb
@@ -7,7 +7,7 @@ class TestBugReporter < Test::Unit::TestCase
skip if ENV['RUBY_ON_BUG']
description = RUBY_DESCRIPTION
- description = description.sub(/\+JIT /, '') if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
+ description = description.sub(/\+JIT /, '') if defined?(RubyVM::JIT) && RubyVM::JIT.enabled?
expected_stderr = [
:*,
/\[BUG\]\sSegmentation\sfault.*\n/,
diff --git a/test/csv/parse/test_general.rb b/test/csv/parse/test_general.rb
index 52b0cab000..14903d462c 100644
--- a/test/csv/parse/test_general.rb
+++ b/test/csv/parse/test_general.rb
@@ -247,7 +247,7 @@ line,5,jkl
def assert_parse_errors_out(data, **options)
assert_raise(CSV::MalformedCSVError) do
timeout = 0.2
- if defined?(RubyVM::MJIT.enabled?) and RubyVM::MJIT.enabled?
+ if defined?(RubyVM::JIT.enabled?) and RubyVM::JIT.enabled?
timeout = 5 # for --jit-wait
end
Timeout.timeout(timeout) do
diff --git a/test/drb/drbtest.rb b/test/drb/drbtest.rb
index 16ffec904b..acef380ad6 100644
--- a/test/drb/drbtest.rb
+++ b/test/drb/drbtest.rb
@@ -216,7 +216,7 @@ module DRbCore
def test_06_timeout
skip if RUBY_PLATFORM.include?("armv7l-linux")
skip if RUBY_PLATFORM.include?("sparc-solaris2.10")
- skip if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # expecting a certain delay is difficult for --jit-wait CI
+ skip if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # expecting a certain delay is difficult for --jit-wait CI
Timeout.timeout(60) do
ten = Onecky.new(10)
assert_raise(Timeout::Error) do
diff --git a/test/lib/jit_support.rb b/test/lib/jit_support.rb
index 2f6d637ec9..3bca63a549 100644
--- a/test/lib/jit_support.rb
+++ b/test/lib/jit_support.rb
@@ -74,7 +74,7 @@ module JITSupport
end
def remove_mjit_logs(stderr)
- if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # utility for -DFORCE_MJIT_ENABLE
+ if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # utility for -DFORCE_MJIT_ENABLE
stderr.gsub(/^MJIT warning: Skipped to compile unsupported instruction: \w+\n/m, '')
else
stderr
diff --git a/test/net/ftp/test_ftp.rb b/test/net/ftp/test_ftp.rb
index 023e79435a..6cd32add90 100644
--- a/test/net/ftp/test_ftp.rb
+++ b/test/net/ftp/test_ftp.rb
@@ -762,7 +762,7 @@ class FTPTest < Test::Unit::TestCase
begin
begin
ftp = Net::FTP.new
- ftp.read_timeout *= 5 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
+ ftp.read_timeout *= 5 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # for --jit-wait
ftp.connect(SERVER_ADDR, server.port)
ftp.login
assert_match(/\AUSER /, commands.shift)
@@ -807,7 +807,7 @@ class FTPTest < Test::Unit::TestCase
begin
begin
ftp = Net::FTP.new
- ftp.read_timeout *= 5 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
+ ftp.read_timeout *= 5 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # for --jit-wait
ftp.connect(SERVER_ADDR, server.port)
ftp.login
assert_match(/\AUSER /, commands.shift)
@@ -1545,7 +1545,7 @@ EOF
begin
begin
ftp = Net::FTP.new
- ftp.read_timeout *= 5 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
+ ftp.read_timeout *= 5 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # for --jit-wait
ftp.connect(SERVER_ADDR, server.port)
assert_equal(['LANG EN*', 'UTF8'], ftp.features)
assert_equal("FEAT\r\n", commands.shift)
@@ -1568,7 +1568,7 @@ EOF
begin
begin
ftp = Net::FTP.new
- ftp.read_timeout *= 5 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
+ ftp.read_timeout *= 5 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # for --jit-wait
ftp.connect(SERVER_ADDR, server.port)
assert_raise(Net::FTPPermError) do
ftp.features
@@ -1594,7 +1594,7 @@ EOF
begin
begin
ftp = Net::FTP.new
- ftp.read_timeout *= 5 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
+ ftp.read_timeout *= 5 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # for --jit-wait
ftp.connect(SERVER_ADDR, server.port)
ftp.option("UTF8", "ON")
assert_equal("OPTS UTF8 ON\r\n", commands.shift)
@@ -1653,7 +1653,7 @@ EOF
begin
begin
ftp = Net::FTP.new
- ftp.read_timeout *= 5 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
+ ftp.read_timeout *= 5 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # for --jit-wait
ftp.connect(SERVER_ADDR, server.port)
entry = ftp.mlst("foo")
assert_equal("/foo", entry.pathname)
@@ -1740,7 +1740,7 @@ EOF
begin
begin
ftp = Net::FTP.new
- ftp.read_timeout *= 5 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
+ ftp.read_timeout *= 5 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # for --jit-wait
ftp.connect(SERVER_ADDR, server.port)
ftp.login
assert_match(/\AUSER /, commands.shift)
@@ -1779,7 +1779,7 @@ EOF
def test_parse257
ftp = Net::FTP.new
- ftp.read_timeout *= 5 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
+ ftp.read_timeout *= 5 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # for --jit-wait
assert_equal('/foo/bar',
ftp.send(:parse257, '257 "/foo/bar" directory created'))
assert_equal('/foo/bar"baz',
@@ -1918,7 +1918,7 @@ EOF
port: port,
ssl: { ca_file: CA_FILE },
passive: false)
- ftp.read_timeout *= 5 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
+ ftp.read_timeout *= 5 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # for --jit-wait
begin
assert_equal("AUTH TLS\r\n", commands.shift)
assert_equal("PBSZ 0\r\n", commands.shift)
@@ -2003,7 +2003,7 @@ EOF
port: port,
ssl: { ca_file: CA_FILE },
passive: true)
- ftp.read_timeout *= 5 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
+ ftp.read_timeout *= 5 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # for --jit-wait
begin
assert_equal("AUTH TLS\r\n", commands.shift)
assert_equal("PBSZ 0\r\n", commands.shift)
@@ -2079,7 +2079,7 @@ EOF
ssl: { ca_file: CA_FILE },
private_data_connection: false,
passive: false)
- ftp.read_timeout *= 5 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
+ ftp.read_timeout *= 5 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # for --jit-wait
begin
assert_equal("AUTH TLS\r\n", commands.shift)
ftp.login
@@ -2149,7 +2149,7 @@ EOF
ssl: { ca_file: CA_FILE },
private_data_connection: false,
passive: true)
- ftp.read_timeout *= 5 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
+ ftp.read_timeout *= 5 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # for --jit-wait
begin
assert_equal("AUTH TLS\r\n", commands.shift)
ftp.login
@@ -2230,7 +2230,7 @@ EOF
ftp = Net::FTP.new(SERVER_NAME,
port: server.port,
ssl: { ca_file: CA_FILE })
- ftp.read_timeout *= 5 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
+ ftp.read_timeout *= 5 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # for --jit-wait
assert_equal("AUTH TLS\r\n", commands.shift)
assert_equal("PBSZ 0\r\n", commands.shift)
assert_equal("PROT P\r\n", commands.shift)
@@ -2283,7 +2283,7 @@ EOF
begin
ftp = Net::FTP.new
ftp.resume = resume
- ftp.read_timeout = (defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?) ? 300 : 0.2 # use large timeout for --jit-wait
+ ftp.read_timeout = (defined?(RubyVM::JIT) && RubyVM::JIT.enabled?) ? 300 : 0.2 # use large timeout for --jit-wait
ftp.connect(SERVER_ADDR, server.port)
ftp.login
assert_match(/\AUSER /, commands.shift)
@@ -2342,7 +2342,7 @@ EOF
chdir_to_tmpdir do
begin
ftp = Net::FTP.new
- ftp.read_timeout *= 5 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
+ ftp.read_timeout *= 5 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # for --jit-wait
ftp.connect(SERVER_ADDR, server.port)
ftp.login
assert_match(/\AUSER /, commands.shift)
@@ -2393,7 +2393,7 @@ EOF
File.binwrite("./|echo hello", binary_data)
begin
ftp = Net::FTP.new
- ftp.read_timeout = RubyVM::MJIT.enabled? ? 300 : 0.2 # use large timeout for --jit-wait
+ ftp.read_timeout = RubyVM::JIT.enabled? ? 300 : 0.2 # use large timeout for --jit-wait
ftp.connect(SERVER_ADDR, server.port)
ftp.login
assert_match(/\AUSER /, commands.shift)
@@ -2448,7 +2448,7 @@ EOF
end
begin
ftp = Net::FTP.new
- ftp.read_timeout *= 5 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
+ ftp.read_timeout *= 5 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # for --jit-wait
ftp.connect(SERVER_ADDR, server.port)
ftp.login
assert_match(/\AUSER /, commands.shift)
diff --git a/test/net/http/test_httpresponse.rb b/test/net/http/test_httpresponse.rb
index a70a9bce34..5063384569 100644
--- a/test/net/http/test_httpresponse.rb
+++ b/test/net/http/test_httpresponse.rb
@@ -78,7 +78,7 @@ EOS
def test_read_body_block_mod
# http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3019353
- skip 'too unstable with --jit-wait, and extending read_timeout did not help it' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
+ skip 'too unstable with --jit-wait, and extending read_timeout did not help it' if defined?(RubyVM::JIT) && RubyVM::JIT.enabled?
IO.pipe do |r, w|
buf = 'x' * 1024
buf.freeze
diff --git a/test/net/smtp/test_smtp.rb b/test/net/smtp/test_smtp.rb
index e909909dec..9b044ec1a2 100644
--- a/test/net/smtp/test_smtp.rb
+++ b/test/net/smtp/test_smtp.rb
@@ -31,7 +31,7 @@ module Net
def setup
# Avoid hanging at fake_server_start's IO.select on --jit-wait CI like http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3302796
# Unfortunately there's no way to configure read_timeout for Net::SMTP.start.
- if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
+ if defined?(RubyVM::JIT) && RubyVM::JIT.enabled?
Net::SMTP.prepend Module.new {
def initialize(*)
super
diff --git a/test/reline/test_within_pipe.rb b/test/reline/test_within_pipe.rb
index 70a0e0a5de..4a46c9c9f1 100644
--- a/test/reline/test_within_pipe.rb
+++ b/test/reline/test_within_pipe.rb
@@ -8,7 +8,7 @@ class Reline::WithinPipeTest < Reline::TestCase
@reader, @output_writer = IO.pipe((RELINE_TEST_ENCODING rescue Encoding.default_external))
@output = Reline.output = @output_writer
@config = Reline.send(:core).config
- @config.keyseq_timeout *= 600 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait CI
+ @config.keyseq_timeout *= 600 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # for --jit-wait CI
@line_editor = Reline.send(:core).line_editor
end
diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb
index 00e1ba7877..f155e88de1 100644
--- a/test/rinda/test_rinda.rb
+++ b/test/rinda/test_rinda.rb
@@ -402,7 +402,7 @@ module TupleSpaceTestModule
end
def test_cancel_02
- skip 'this test is unstable with --jit-wait' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
+ skip 'this test is unstable with --jit-wait' if defined?(RubyVM::JIT) && RubyVM::JIT.enabled?
entry = @ts.write([:removeme, 1])
assert_equal([[:removeme, 1]], @ts.read_all([nil, nil]))
entry.cancel
@@ -662,7 +662,7 @@ class TestRingServer < Test::Unit::TestCase
end
def test_do_reply_local
- skip 'timeout-based test becomes unstable with --jit-wait' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
+ skip 'timeout-based test becomes unstable with --jit-wait' if defined?(RubyVM::JIT) && RubyVM::JIT.enabled?
with_timeout(30) {_test_do_reply_local}
end
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
diff --git a/test/rubygems/test_gem_stream_ui.rb b/test/rubygems/test_gem_stream_ui.rb
index ca6dbc6a8b..e154a723c9 100644
--- a/test/rubygems/test_gem_stream_ui.rb
+++ b/test/rubygems/test_gem_stream_ui.rb
@@ -5,7 +5,7 @@ require 'timeout'
class TestGemStreamUI < Gem::TestCase
# increase timeout with MJIT for --jit-wait testing
- mjit_enabled = defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
+ mjit_enabled = defined?(RubyVM::JIT) && RubyVM::JIT.enabled?
SHORT_TIMEOUT = (RUBY_ENGINE == "ruby" && !mjit_enabled) ? 0.1 : 1.0
module IsTty
diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb
index 49587dc244..9cef9f0d6f 100644
--- a/test/socket/test_socket.rb
+++ b/test/socket/test_socket.rb
@@ -478,7 +478,7 @@ class TestSocket < Test::Unit::TestCase
end while IO.select([r], nil, nil, 0.1).nil?
n
end
- timeout = (defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? ? 120 : 30) # for --jit-wait
+ timeout = (defined?(RubyVM::JIT) && RubyVM::JIT.enabled? ? 120 : 30) # for --jit-wait
assert_equal([[s1],[],[]], IO.select([s1], nil, nil, timeout))
msg, _, _, stamp = s1.recvmsg
assert_equal("a", msg)