summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-03-06 23:17:25 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2023-03-06 23:44:01 -0800
commit23ec248e48f696ae986e2b19cd572ece02a5ba55 (patch)
tree3973e15ea1c34d000b40a64bd64e78880f28efec /test
parent2e875549a934fa04b7939810fa0d8a2762702aaa (diff)
s/mjit/rjit/
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7462
Diffstat (limited to 'test')
-rw-r--r--test/-ext-/bug_reporter/test_bug_reporter.rb2
-rw-r--r--test/lib/jit_support.rb16
-rw-r--r--test/net/http/test_httpresponse.rb2
-rw-r--r--test/ruby/test_io.rb4
-rw-r--r--test/ruby/test_module.rb2
-rw-r--r--test/ruby/test_rubyoptions.rb26
-rw-r--r--test/ruby/test_yjit.rb2
-rw-r--r--test/rubygems/test_gem_stream_ui.rb4
-rw-r--r--test/test_open3.rb2
9 files changed, 30 insertions, 30 deletions
diff --git a/test/-ext-/bug_reporter/test_bug_reporter.rb b/test/-ext-/bug_reporter/test_bug_reporter.rb
index fb1b61d367..6e44337d41 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(/\+RJIT /, '') unless JITSupport.mjit_force_enabled?
+ description = description.sub(/\+RJIT /, '') unless JITSupport.rjit_force_enabled?
expected_stderr = [
:*,
/\[BUG\]\sSegmentation\sfault.*\n/,
diff --git a/test/lib/jit_support.rb b/test/lib/jit_support.rb
index 769bc3d644..d9c2522641 100644
--- a/test/lib/jit_support.rb
+++ b/test/lib/jit_support.rb
@@ -25,7 +25,7 @@ module JITSupport
]
module_function
- # Run Ruby script with --mjit-wait (Synchronous JIT compilation).
+ # Run Ruby script with --rjit-wait (Synchronous JIT compilation).
# Returns [stdout, stderr]
def eval_with_jit(env = nil, script, **opts)
stdout, stderr = nil, nil
@@ -40,13 +40,13 @@ module JITSupport
def eval_with_jit_without_retry(env = nil, script, verbose: 0, call_threshold: 5, save_temps: false, max_cache: 1000, wait: true, timeout: JIT_TIMEOUT)
args = [
- '--disable-gems', "--mjit-verbose=#{verbose}",
- "--mjit-call-threshold=#{call_threshold}", "--mjit-max-cache=#{max_cache}",
+ '--disable-gems', "--rjit-verbose=#{verbose}",
+ "--rjit-call-threshold=#{call_threshold}", "--rjit-max-cache=#{max_cache}",
]
args << '--disable-yjit'
- args << '--mjit-wait' if wait
- args << '--mjit-save-temps' if save_temps
- args << '--mjit-debug' if defined?(@mjit_debug) && @mjit_debug
+ args << '--rjit-wait' if wait
+ args << '--rjit-save-temps' if save_temps
+ args << '--rjit-debug' if defined?(@rjit_debug) && @rjit_debug
args << '-e' << script
args.unshift(env ? base_env.merge!(env) : base_env)
EnvUtil.invoke_ruby(args,
@@ -69,7 +69,7 @@ module JITSupport
@yjit_supported = ![nil, 'no'].include?(RbConfig::CONFIG['YJIT_SUPPORT'])
end
- def remove_mjit_logs(stderr)
+ def remove_rjit_logs(stderr)
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
@@ -87,7 +87,7 @@ module JITSupport
stderr.include?("error trying to exec 'cc1': execvp: No such file or directory")
end
- def mjit_force_enabled?
+ def rjit_force_enabled?
"#{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 a8e6fa1ed1..99a946748c 100644
--- a/test/net/http/test_httpresponse.rb
+++ b/test/net/http/test_httpresponse.rb
@@ -312,7 +312,7 @@ EOS
end
def test_read_body_block_mod
- # http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3019353
+ # http://ci.rvm.jp/results/trunk-rjit-wait@silicon-docker/3019353
if defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled?
omit 'too unstable with --jit-wait, and extending read_timeout did not help it'
end
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 55fefab97c..0716dd7bf9 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -2347,8 +2347,8 @@ class TestIO < Test::Unit::TestCase
end
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
+ # http://ci.rvm.jp/results/trunk-rjit@silicon-docker/1465760
+ # http://ci.rvm.jp/results/trunk-rjit@silicon-docker/1469765
omit 'this randomly fails with RJIT' if defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled?
feature2250 = '[ruby-core:26222]'
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 3add9b7250..1ae48ef2bd 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::RJIT) && RubyVM::RJIT.enabled?
+ omit "Investigating trunk-rjit 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_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index aca6608126..63746c3684 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -7,11 +7,11 @@ require 'tempfile'
require_relative '../lib/jit_support'
class TestRubyOptions < Test::Unit::TestCase
- def self.mjit_enabled? = defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled?
+ def self.rjit_enabled? = defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled?
def self.yjit_enabled? = defined?(RubyVM::YJIT.enabled?) && RubyVM::YJIT.enabled?
NO_JIT_DESCRIPTION =
- if mjit_enabled?
+ if rjit_enabled?
RUBY_DESCRIPTION.sub(/\+RJIT /, '')
elsif yjit_enabled?
RUBY_DESCRIPTION.sub(/\+YJIT( (dev|dev_nodebug|stats))? /, '')
@@ -149,7 +149,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 self.class.mjit_enabled? && !JITSupport.mjit_force_enabled?
+ if self.class.rjit_enabled? && !JITSupport.rjit_force_enabled?
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])
@@ -217,7 +217,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 self.class.mjit_enabled? || self.class.yjit_enabled? # checking -D(M|Y)JIT_FORCE_ENABLE
+ elsif self.class.rjit_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])
@@ -230,9 +230,9 @@ class TestRubyOptions < Test::Unit::TestCase
return if yjit_force_enabled?
[
- %w(--version --mjit --disable=mjit),
- %w(--version --enable=mjit --disable=mjit),
- %w(--version --enable-mjit --disable-mjit),
+ %w(--version --rjit --disable=rjit),
+ %w(--version --enable=rjit --disable=rjit),
+ %w(--version --enable-rjit --disable-rjit),
*([
%w(--version --jit --disable=jit),
%w(--version --enable=jit --disable=jit),
@@ -248,9 +248,9 @@ class TestRubyOptions < Test::Unit::TestCase
if JITSupport.supported?
[
- %w(--version --mjit),
- %w(--version --enable=mjit),
- %w(--version --enable-mjit),
+ %w(--version --rjit),
+ %w(--version --enable=rjit),
+ %w(--version --enable-rjit),
*([
%w(--version --jit),
%w(--version --enable=jit),
@@ -259,10 +259,10 @@ 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 JITSupport.mjit_force_enabled?
+ if JITSupport.rjit_force_enabled?
assert_equal(RUBY_DESCRIPTION, r[0])
else
- assert_equal(EnvUtil.invoke_ruby([env, '--mjit', '-e', 'print RUBY_DESCRIPTION'], '', true).first, r[0])
+ assert_equal(EnvUtil.invoke_ruby([env, '--rjit', '-e', 'print RUBY_DESCRIPTION'], '', true).first, r[0])
end
assert_equal([], e)
end
@@ -742,7 +742,7 @@ class TestRubyOptions < Test::Unit::TestCase
-e:(?:1:)?\s\[BUG\]\sSegmentation\sfault.*\n
)x,
%r(
- #{ Regexp.quote((TestRubyOptions.mjit_enabled? && !JITSupport.mjit_force_enabled?) ? NO_JIT_DESCRIPTION : RUBY_DESCRIPTION) }\n\n
+ #{ Regexp.quote((TestRubyOptions.rjit_enabled? && !JITSupport.rjit_force_enabled?) ? NO_JIT_DESCRIPTION : RUBY_DESCRIPTION) }\n\n
)x,
%r(
(?:--\s(?:.+\n)*\n)?
diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb
index 537735de4c..3d354bfc6c 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 RJIT tests in test/ruby/test_mjit.rb
+# insipired by the RJIT tests in test/ruby/test_rjit.rb
class TestYJIT < Test::Unit::TestCase
running_with_yjit = defined?(RubyVM::YJIT) && RubyVM::YJIT.enabled?
diff --git a/test/rubygems/test_gem_stream_ui.rb b/test/rubygems/test_gem_stream_ui.rb
index 06c3ba2ec9..b6b85b5c43 100644
--- a/test/rubygems/test_gem_stream_ui.rb
+++ b/test/rubygems/test_gem_stream_ui.rb
@@ -5,8 +5,8 @@ require "timeout"
class TestGemStreamUI < Gem::TestCase
# 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
+ rjit_enabled = defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled?
+ SHORT_TIMEOUT = (RUBY_ENGINE == "ruby" && !rjit_enabled) ? 0.1 : 1.0
module IsTty
attr_accessor :tty
diff --git a/test/test_open3.rb b/test/test_open3.rb
index a06697a37b..09f30f46dd 100644
--- a/test/test_open3.rb
+++ b/test/test_open3.rb
@@ -131,7 +131,7 @@ class TestOpen3 < Test::Unit::TestCase
STDERR.reopen(old)
assert_equal("zo", o.read)
if defined?(JITSupport)
- assert_equal("ze", JITSupport.remove_mjit_logs(r.read))
+ assert_equal("ze", JITSupport.remove_rjit_logs(r.read))
else
assert_equal("ze", r.read)
end