1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_array.rb: do minor GC

* test/ruby/test_array.rb (test_shared_marking): do minor GC to
  reduce WB-missed messages.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-04-11 01:49:04 +00:00
parent 4b86cf6e98
commit 48d5eb3d40

View file

@ -2431,8 +2431,10 @@ class TestArray < Test::Unit::TestCase
def test_shared_marking
reduce = proc do |s|
s.gsub(/(verify_internal_consistency_reachable_i:\sWB\smiss\s\S+\s\(T_ARRAY\)\s->\s)\S+\s\(proc\)\n
\K(?:\1\S+\s\(proc\)\n)*/x, "...\n")
s.gsub(/(verify_internal_consistency_reachable_i:\sWB\smiss\s\S+\s\(T_ARRAY\)\s->\s)\S+\s\((proc|T_NONE)\)\n
\K(?:\1\S+\s\(\2\)\n)*/x) do
"...(snip #{$&.count("\n")} lines)...\n"
end
end
assert_normal_exit(<<-EOS, '[Bug #9718]', timeout: 5, stdout_filter: reduce)
queue = []
@ -2440,6 +2442,7 @@ class TestArray < Test::Unit::TestCase
100_000.times do
queue << lambda{}
end
GC.start(full_mark: false, immediate_sweep: true)
GC.verify_internal_consistency
queue.shift.call
end