diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2023-03-06 23:15:30 -0800 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2023-03-06 23:44:01 -0800 |
commit | 2e875549a934fa04b7939810fa0d8a2762702aaa (patch) | |
tree | 116b99056f810d48359ac6fa6a3b06e9ddc65c05 /test | |
parent | eaccdc1941304d6273397b21c25213174d892185 (diff) | |
download | ruby-2e875549a934fa04b7939810fa0d8a2762702aaa.tar.gz |
s/MJIT/RJIT/
Diffstat (limited to 'test')
-rw-r--r-- | test/-ext-/bug_reporter/test_bug_reporter.rb | 2 | ||||
-rw-r--r-- | test/csv/parse/test_general.rb | 2 | ||||
-rw-r--r-- | test/drb/drbtest.rb | 2 | ||||
-rw-r--r-- | test/lib/jit_support.rb | 12 | ||||
-rw-r--r-- | test/net/http/test_httpresponse.rb | 2 | ||||
-rw-r--r-- | test/reline/test_within_pipe.rb | 2 | ||||
-rw-r--r-- | test/rinda/test_rinda.rb | 4 | ||||
-rw-r--r-- | test/ruby/test_fiber.rb | 2 | ||||
-rw-r--r-- | test/ruby/test_io.rb | 6 | ||||
-rw-r--r-- | test/ruby/test_module.rb | 2 | ||||
-rw-r--r-- | test/ruby/test_optimization.rb | 2 | ||||
-rw-r--r-- | test/ruby/test_process.rb | 4 | ||||
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 10 | ||||
-rw-r--r-- | test/ruby/test_settracefunc.rb | 4 | ||||
-rw-r--r-- | test/ruby/test_shapes.rb | 2 | ||||
-rw-r--r-- | test/ruby/test_thread.rb | 6 | ||||
-rw-r--r-- | test/ruby/test_yjit.rb | 2 | ||||
-rw-r--r-- | test/ruby/test_yjit_exit_locations.rb | 2 | ||||
-rw-r--r-- | test/rubygems/test_gem_stream_ui.rb | 4 | ||||
-rw-r--r-- | test/socket/test_socket.rb | 2 |
20 files changed, 37 insertions, 37 deletions
diff --git a/test/-ext-/bug_reporter/test_bug_reporter.rb b/test/-ext-/bug_reporter/test_bug_reporter.rb index 81d2ca4674..fb1b61d367 100644 --- a/test/-ext-/bug_reporter/test_bug_reporter.rb +++ b/test/-ext-/bug_reporter/test_bug_reporter.rb @@ -12,7 +12,7 @@ class TestBugReporter < Test::Unit::TestCase omit if ENV['RUBY_ON_BUG'] description = RUBY_DESCRIPTION - description = description.sub(/\+MJIT /, '') unless JITSupport.mjit_force_enabled? + description = description.sub(/\+RJIT /, '') unless JITSupport.mjit_force_enabled? expected_stderr = [ :*, /\[BUG\]\sSegmentation\sfault.*\n/, diff --git a/test/csv/parse/test_general.rb b/test/csv/parse/test_general.rb index 23cd7ee807..48e68d3392 100644 --- a/test/csv/parse/test_general.rb +++ b/test/csv/parse/test_general.rb @@ -329,7 +329,7 @@ line,5,jkl if defined?(RubyVM::YJIT.enabled?) and RubyVM::YJIT.enabled? timeout = 1 # for --yjit-call-threshold=1 end - if defined?(RubyVM::MJIT.enabled?) and RubyVM::MJIT.enabled? + if defined?(RubyVM::RJIT.enabled?) and RubyVM::RJIT.enabled? timeout = 5 # for --jit-wait end Timeout.timeout(timeout) do diff --git a/test/drb/drbtest.rb b/test/drb/drbtest.rb index 71bc92ab70..72220f32ef 100644 --- a/test/drb/drbtest.rb +++ b/test/drb/drbtest.rb @@ -218,7 +218,7 @@ module DRbCore omit if RUBY_PLATFORM.include?("armv7l-linux") omit if RUBY_PLATFORM.include?("sparc-solaris2.10") omit if RUBY_PLATFORM.include?("freebsd") - omit if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # expecting a certain delay is difficult for --jit-wait CI + omit if defined?(RubyVM::RJIT) && RubyVM::RJIT.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 9ff1914133..769bc3d644 100644 --- a/test/lib/jit_support.rb +++ b/test/lib/jit_support.rb @@ -54,11 +54,11 @@ module JITSupport ) end - # For MJIT + # For RJIT def supported? return @supported if defined?(@supported) - @supported = RbConfig::CONFIG["MJIT_SUPPORT"] != 'no' && - UNSUPPORTED_COMPILERS.all? { |regexp| !regexp.match?(RbConfig::CONFIG['MJIT_CC']) } && + @supported = RbConfig::CONFIG["RJIT_SUPPORT"] != 'no' && + UNSUPPORTED_COMPILERS.all? { |regexp| !regexp.match?(RbConfig::CONFIG['RJIT_CC']) } && !PENDING_RUBYCI_NICKNAMES.include?(ENV['RUBYCI_NICKNAME']) && !UNSUPPORTED_ARCHITECTURES.include?(RUBY_PLATFORM.split('-', 2).first) end @@ -70,8 +70,8 @@ module JITSupport end def remove_mjit_logs(stderr) - if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # utility for -DFORCE_MJIT_ENABLE - stderr.gsub(/^MJIT warning: Skipped to compile unsupported instruction: \w+\n/m, '') + if defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? # utility for -DFORCE_RJIT_ENABLE + stderr.gsub(/^RJIT warning: Skipped to compile unsupported instruction: \w+\n/m, '') else stderr end @@ -88,6 +88,6 @@ module JITSupport end def mjit_force_enabled? - "#{RbConfig::CONFIG['CFLAGS']} #{RbConfig::CONFIG['CPPFLAGS']}".match?(/(\A|\s)-D ?MJIT_FORCE_ENABLE\b/) + "#{RbConfig::CONFIG['CFLAGS']} #{RbConfig::CONFIG['CPPFLAGS']}".match?(/(\A|\s)-D ?RJIT_FORCE_ENABLE\b/) end end diff --git a/test/net/http/test_httpresponse.rb b/test/net/http/test_httpresponse.rb index 394b4c5bfa..a8e6fa1ed1 100644 --- a/test/net/http/test_httpresponse.rb +++ b/test/net/http/test_httpresponse.rb @@ -313,7 +313,7 @@ EOS def test_read_body_block_mod # http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3019353 - if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + if defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? omit 'too unstable with --jit-wait, and extending read_timeout did not help it' end IO.pipe do |r, w| diff --git a/test/reline/test_within_pipe.rb b/test/reline/test_within_pipe.rb index 43a66f45f4..930f99c32d 100644 --- a/test/reline/test_within_pipe.rb +++ b/test/reline/test_within_pipe.rb @@ -9,7 +9,7 @@ class Reline::WithinPipeTest < Reline::TestCase @reader, @output_writer = IO.pipe(@encoding) @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::RJIT) && RubyVM::RJIT.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 74d8d363b4..00404e39df 100644 --- a/test/rinda/test_rinda.rb +++ b/test/rinda/test_rinda.rb @@ -402,7 +402,7 @@ module TupleSpaceTestModule end def test_cancel_02 - omit 'this test is unstable with --jit-wait' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + omit 'this test is unstable with --jit-wait' if defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? entry = @ts.write([:removeme, 1]) assert_equal([[:removeme, 1]], @ts.read_all([nil, nil])) entry.cancel @@ -686,7 +686,7 @@ class TestRingServer < Test::Unit::TestCase end def test_do_reply_local - omit 'timeout-based test becomes unstable with --jit-wait' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + omit 'timeout-based test becomes unstable with --jit-wait' if defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? with_timeout(30) {_test_do_reply_local} end diff --git a/test/ruby/test_fiber.rb b/test/ruby/test_fiber.rb index 5825aaf6cc..cb6e846bc6 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 - omit 'This is unstable on GitHub Actions --jit-wait. TODO: debug it' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + omit 'This is unstable on GitHub Actions --jit-wait. TODO: debug it' if defined?(RubyVM::RJIT) && RubyVM::RJIT.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 5ea9a8e574..55fefab97c 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 - omit "MJIT has busy wait on GC. This sometimes fails with --jit." if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + omit "RJIT has busy wait on GC. This sometimes fails with --jit." if defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? omit "multiple threads already active" if Thread.list.size > 1 msg = 'r58534 [ruby-core:80969] [Backport #13533]' @@ -1679,7 +1679,7 @@ class TestIO < Test::Unit::TestCase end if have_nonblock? def test_read_nonblock_no_exceptions - omit '[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. + omit '[ruby-core:90895] RJIT worker may leave fd open in a forked child' if defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? # TODO: consider acquiring GVL from RJIT worker. with_pipe {|r, w| assert_equal :wait_readable, r.read_nonblock(4096, exception: false) w.puts "HI!" @@ -2349,7 +2349,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 - omit 'this randomly fails with MJIT' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + omit 'this randomly fails with RJIT' if defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? feature2250 = '[ruby-core:26222]' pre = 'ft2250' diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 434e720f8b..3add9b7250 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -3172,7 +3172,7 @@ class TestModule < Test::Unit::TestCase end def test_redefinition_mismatch - omit "Investigating trunk-mjit failure on ci.rvm.jp" if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + omit "Investigating trunk-mjit failure on ci.rvm.jp" if defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? m = Module.new m.module_eval "A = 1", __FILE__, line = __LINE__ e = assert_raise_with_message(TypeError, /is not a module/) { diff --git a/test/ruby/test_optimization.rb b/test/ruby/test_optimization.rb index 80c3c3860b..9ce5371dd0 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 - omit 'currently JIT-ed code always creates a new stack frame' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + omit 'currently JIT-ed code always creates a new stack frame' if defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? bug16161 = '[ruby-core:94881]' tailcall("#{<<-"begin;"}\n#{<<~"end;"}") diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 1d04d22631..beb181ccd4 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -272,7 +272,7 @@ class TestProcess < Test::Unit::TestCase end; end - MANDATORY_ENVS = %w[RUBYLIB MJIT_SEARCH_BUILD_DIR] + MANDATORY_ENVS = %w[RUBYLIB RJIT_SEARCH_BUILD_DIR] case RbConfig::CONFIG['target_os'] when /linux/ MANDATORY_ENVS << 'LD_PRELOAD' @@ -1717,7 +1717,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::RJIT) && RubyVM::RJIT.enabled? # checking -DRJIT_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 ff3534a531..aca6608126 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -7,12 +7,12 @@ require 'tempfile' require_relative '../lib/jit_support' class TestRubyOptions < Test::Unit::TestCase - def self.mjit_enabled? = defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + def self.mjit_enabled? = defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? def self.yjit_enabled? = defined?(RubyVM::YJIT.enabled?) && RubyVM::YJIT.enabled? NO_JIT_DESCRIPTION = if mjit_enabled? - RUBY_DESCRIPTION.sub(/\+MJIT /, '') + RUBY_DESCRIPTION.sub(/\+RJIT /, '') elsif yjit_enabled? RUBY_DESCRIPTION.sub(/\+YJIT( (dev|dev_nodebug|stats))? /, '') else @@ -140,7 +140,7 @@ class TestRubyOptions < Test::Unit::TestCase VERSION_PATTERN_WITH_JIT = case RUBY_ENGINE when 'ruby' - /^ruby #{q[RUBY_VERSION]}(?:[p ]|dev|rc).*? \+MJIT \[#{q[RUBY_PLATFORM]}\]$/ + /^ruby #{q[RUBY_VERSION]}(?:[p ]|dev|rc).*? \+RJIT \[#{q[RUBY_PLATFORM]}\]$/ else VERSION_PATTERN end @@ -225,8 +225,8 @@ class TestRubyOptions < Test::Unit::TestCase assert_equal([], e) end - omit "This fails on some CIs for now. To be fixed in MJIT's side." - return if RbConfig::CONFIG["MJIT_SUPPORT"] == 'no' + omit "This fails on some CIs for now. To be fixed in RJIT's side." + return if RbConfig::CONFIG["RJIT_SUPPORT"] == 'no' return if yjit_force_enabled? [ diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index f869f574a7..a30c4309ad 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -2168,9 +2168,9 @@ CODE } # it is dirty hack. usually we shouldn't use such technique Thread.pass until t.status == 'sleep' - # When MJIT thread exists, t.status becomes 'sleep' even if it does not reach m2t_q.pop. + # When RJIT 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::RJIT) && RubyVM::RJIT.enabled? t.add_trace_func proc{|ev, file, line, *args| if file == __FILE__ diff --git a/test/ruby/test_shapes.rb b/test/ruby/test_shapes.rb index b8fa73cb88..b1a2ba2f1b 100644 --- a/test/ruby/test_shapes.rb +++ b/test/ruby/test_shapes.rb @@ -348,7 +348,7 @@ class TestShapes < Test::Unit::TestCase end def test_basic_shape_transition - omit "Failing with MJIT for some reason" if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + omit "Failing with RJIT for some reason" if defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? obj = Example.new shape = RubyVM::Shape.of(obj) refute_equal(RubyVM::Shape.root_shape, shape) diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index 85fbde2de8..e6f347c486 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -323,7 +323,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::RJIT) && RubyVM::RJIT.enabled? # t.stop? behaves unexpectedly with --jit-wait assert_equal(1, s) t.wakeup Thread.pass while t.alive? @@ -1446,8 +1446,8 @@ q.pop def test_thread_interrupt_for_killed_thread opts = { timeout: 5, timeout_error: nil } - # prevent SIGABRT from slow shutdown with MJIT - opts[:reprieve] = 3 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + # prevent SIGABRT from slow shutdown with RJIT + opts[:reprieve] = 3 if defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? assert_normal_exit(<<-_end, '[Bug #8996]', **opts) Thread.report_on_exception = false diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb index 3f7704116f..537735de4c 100644 --- a/test/ruby/test_yjit.rb +++ b/test/ruby/test_yjit.rb @@ -11,7 +11,7 @@ require_relative '../lib/jit_support' return unless JITSupport.yjit_supported? # Tests for YJIT with assertions on compilation and side exits -# insipired by the MJIT tests in test/ruby/test_mjit.rb +# insipired by the RJIT tests in test/ruby/test_mjit.rb class TestYJIT < Test::Unit::TestCase running_with_yjit = defined?(RubyVM::YJIT) && RubyVM::YJIT.enabled? diff --git a/test/ruby/test_yjit_exit_locations.rb b/test/ruby/test_yjit_exit_locations.rb index 5421f9c804..851a582470 100644 --- a/test/ruby/test_yjit_exit_locations.rb +++ b/test/ruby/test_yjit_exit_locations.rb @@ -11,7 +11,7 @@ require_relative '../lib/jit_support' return unless JITSupport.yjit_supported? # Tests for YJIT with assertions on tracing exits -# insipired by the MJIT tests in test/ruby/test_yjit.rb +# insipired by the RJIT tests in test/ruby/test_yjit.rb class TestYJITExitLocations < Test::Unit::TestCase def test_yjit_trace_exits_and_v_no_error _stdout, stderr, _status = EnvUtil.invoke_ruby(%w(-v --yjit-trace-exits), '', true, true) diff --git a/test/rubygems/test_gem_stream_ui.rb b/test/rubygems/test_gem_stream_ui.rb index 3dbc346271..06c3ba2ec9 100644 --- a/test/rubygems/test_gem_stream_ui.rb +++ b/test/rubygems/test_gem_stream_ui.rb @@ -4,8 +4,8 @@ require "rubygems/user_interaction" require "timeout" class TestGemStreamUI < Gem::TestCase - # increase timeout with MJIT for --jit-wait testing - mjit_enabled = defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + # increase timeout with RJIT for --jit-wait testing + mjit_enabled = defined?(RubyVM::RJIT) && RubyVM::RJIT.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 e3ce2b920e..edcfcdb889 100644 --- a/test/socket/test_socket.rb +++ b/test/socket/test_socket.rb @@ -486,7 +486,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::RJIT) && RubyVM::RJIT.enabled? ? 120 : 30) # for --jit-wait assert_equal([[s1],[],[]], IO.select([s1], nil, nil, timeout)) msg, _, _, stamp = s1.recvmsg assert_equal("a", msg) |