Revert "Revert "Re-enable test_ractor for YJIT""

This reverts commit 9792d9e40f.

Ractor implementation has been rewritten. Let's see if it works now.
This commit is contained in:
Takashi Kokubun 2023-03-02 09:10:49 -08:00
Родитель 573522bd84
Коммит fac92cd050
1 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -479,7 +479,6 @@ assert_equal 'ok', %q{
} }
# multiple Ractors can receive (wait) from one Ractor # multiple Ractors can receive (wait) from one Ractor
yjit_enabled = ENV.key?('RUBY_YJIT_ENABLE') || ENV.fetch('RUN_OPTS', '').include?('yjit')
assert_equal '[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]', %q{ assert_equal '[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]', %q{
pipe = Ractor.new do pipe = Ractor.new do
loop do loop do
@ -502,8 +501,7 @@ assert_equal '[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]', %q{
rs.delete r rs.delete r
n n
}.sort }.sort
} unless /mswin/ =~ RUBY_PLATFORM || # randomly hangs on mswin https://github.com/ruby/ruby/actions/runs/3753871445/jobs/6377551069#step:20:131 } unless /mswin/ =~ RUBY_PLATFORM # randomly hangs on mswin https://github.com/ruby/ruby/actions/runs/3753871445/jobs/6377551069#step:20:131
yjit_enabled # flaky with YJIT https://github.com/ruby/ruby/actions/runs/3603398545/jobs/6071549328#step:18:33
# Ractor.select also support multiple take, receive and yield # Ractor.select also support multiple take, receive and yield
assert_equal '[true, true, true]', %q{ assert_equal '[true, true, true]', %q{
@ -1493,7 +1491,7 @@ assert_equal "#{n}#{n}", %Q{
end end
end end
}.map{|r| r.take}.join }.map{|r| r.take}.join
} unless yjit_enabled # flaky with YJIT https://github.com/ruby/ruby/actions/runs/3692339025/jobs/6251137785 }
# NameError # NameError
assert_equal "ok", %q{ assert_equal "ok", %q{
@ -1534,7 +1532,7 @@ assert_equal "ok", %q{
1_000.times { idle_worker, tmp_reporter = Ractor.select(*workers) } 1_000.times { idle_worker, tmp_reporter = Ractor.select(*workers) }
"ok" "ok"
} unless yjit_enabled # flaky with YJIT https://github.com/ruby/ruby/actions/runs/3575374374/jobs/6011846425 }
assert_equal "ok", %q{ assert_equal "ok", %q{
def foo(*); ->{ super }; end def foo(*); ->{ super }; end