ruby-changes:40059
From: odaira <ko1@a...>
Date: Sat, 17 Oct 2015 05:36:07 +0900 (JST)
Subject: [ruby-changes:40059] odaira:r52140 (trunk): * test/ruby/test_symbol.rb (test_symbol_fstr_leak): add a warm-up
odaira 2015-10-17 05:35:47 +0900 (Sat, 17 Oct 2015) New Revision: 52140 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52140 Log: * test/ruby/test_symbol.rb (test_symbol_fstr_leak): add a warm-up code and check RSS to avoid false positive on AIX and false negative on Mac OS X. [Bug #10686] Modified files: trunk/ChangeLog trunk/test/ruby/test_symbol.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 52139) +++ ChangeLog (revision 52140) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Oct 17 05:28:32 2015 Rei Odaira <Rei.Odaira@g...> + + * test/ruby/test_symbol.rb (test_symbol_fstr_leak): add a warm-up + code and check RSS to avoid false positive on AIX and false + negative on Mac OS X. [Bug #10686] + Fri Oct 16 15:54:37 2015 Nobuyoshi Nakada <nobu@r...> * file.c (rb_file_load_ok): open in non-blocking mode withoout Index: test/ruby/test_symbol.rb =================================================================== --- test/ruby/test_symbol.rb (revision 52139) +++ test/ruby/test_symbol.rb (revision 52140) @@ -313,8 +313,8 @@ class TestSymbol < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_symbol.rb#L313 def test_symbol_fstr_leak bug10686 = '[ruby-core:67268] [Bug #10686]' x = 0 - assert_no_memory_leak([], '', <<-"end;", bug10686, limit: 1.71) - 200_000.times { |i| i.to_s.to_sym } + assert_no_memory_leak([], '200_000.times { |i| i.to_s.to_sym }; GC.start', <<-"end;", bug10686, limit: 1.71, rss: true) + 200_000.times { |i| (i + 200_000).to_s.to_sym } end; end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/