diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-23 03:33:10 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-23 03:33:10 +0000 |
commit | dbe9e6a5f8ed9912c86f508b3f4a092d58c79188 (patch) | |
tree | 8bff4978adfa595e431c9928208acc68c2b55b60 /test/ruby/test_gc.rb | |
parent | 65a564376e9e3a1a28120de1bb1b2ce89266e17b (diff) | |
download | ruby-dbe9e6a5f8ed9912c86f508b3f4a092d58c79188.tar.gz |
* gc.c: fix gloval variable name.
Now we have following environments (and related variable names).
* RUBY_GC_HEAP_INIT_SLOTS
* RUBY_GC_HEAP_FREE_SLOTS
* RUBY_GC_HEAP_GROWTH_FACTOR (new from 2.1)
* RUBY_GC_HEAP_GROWTH_MAX_SLOTS (new from 2.1)
* obsolete
* RUBY_FREE_MIN -> RUBY_GC_HEAP_FREE_SLOTS (from 2.1)
* RUBY_HEAP_MIN_SLOTS -> RUBY_GC_HEAP_INIT_SLOTS (from 2.1)
* RUBY_GC_MALLOC_LIMIT
* RUBY_GC_MALLOC_LIMIT_MAX (new from 2.1)
* RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR (new from 2.1)
* RUBY_GC_OLDSPACE_LIMIT (new from 2.1)
* RUBY_GC_OLDSPACE_LIMIT_MAX (new from 2.1)
* RUBY_GC_OLDSPACE_LIMIT_GROWTH_FACTOR (new from 2.1)
* test/ruby/test_gc.rb: catch up this change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_gc.rb')
-rw-r--r-- | test/ruby/test_gc.rb | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 4218dab888..64ce408567 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -109,26 +109,32 @@ class TestGc < Test::Unit::TestCase def test_gc_parameter env = { "RUBY_GC_MALLOC_LIMIT" => "60000000", - "RUBY_HEAP_MIN_SLOTS" => "100000" + "RUBY_GC_HEAP_INIT_SLOTS" => "100000" } assert_normal_exit("exit", "[ruby-core:39777]", :child_env => env) env = { "RUBYOPT" => "", - "RUBY_HEAP_MIN_SLOTS" => "100000" + "RUBY_GC_HEAP_INIT_SLOTS" => "100000" } assert_in_out_err([env, "-e", "exit"], "", [], [], "[ruby-core:39795]") assert_in_out_err([env, "-W0", "-e", "exit"], "", [], [], "[ruby-core:39795]") assert_in_out_err([env, "-W1", "-e", "exit"], "", [], [], "[ruby-core:39795]") - assert_in_out_err([env, "-w", "-e", "exit"], "", [], /HEAP_MIN_SLOTS=100000/, "[ruby-core:39795]") + assert_in_out_err([env, "-w", "-e", "exit"], "", [], /RUBY_GC_HEAP_INIT_SLOTS=100000/, "[ruby-core:39795]") env = { - "RUBY_HEAP_SLOTS_GROWTH_FACTOR" => "2.0", - "RUBY_HEAP_SLOTS_GROWTH_MAX" => "10000" + "RUBY_GC_HEAP_GROWTH_FACTOR" => "2.0", + "RUBY_GC_HEAP_GROWTH_MAX_SLOTS" => "10000" } assert_normal_exit("exit", "", :child_env => env) - assert_in_out_err([env, "-w", "-e", "exit"], "", [], /HEAP_SLOTS_GROWTH_FACTOR=2.0/, "") - assert_in_out_err([env, "-w", "-e", "exit"], "", [], /HEAP_SLOTS_GROWTH_MAX=10000/, "[ruby-core:57928]") + assert_in_out_err([env, "-w", "-e", "exit"], "", [], /RUBY_GC_HEAP_GROWTH_FACTOR=2.0/, "") + assert_in_out_err([env, "-w", "-e", "exit"], "", [], /RUBY_GC_HEAP_GROWTH_MAX_SLOTS=10000/, "[ruby-core:57928]") + + # check obsolete + assert_in_out_err([{'RUBY_FREE_MIN' => '100'}, '-w', '-eexit'], '', [], + /RUBY_FREE_MIN is obsolete. Use RUBY_GC_HEAP_FREE_SLOTS instead/) + assert_in_out_err([{'RUBY_HEAP_MIN_SLOTS' => '100'}, '-w', '-eexit'], '', [], + /RUBY_HEAP_MIN_SLOTS is obsolete. Use RUBY_GC_HEAP_INIT_SLOTS instead/) env = { "RUBY_GC_MALLOC_LIMIT" => "60000000", @@ -139,6 +145,16 @@ class TestGc < Test::Unit::TestCase assert_in_out_err([env, "-w", "-e", "exit"], "", [], /RUBY_GC_MALLOC_LIMIT=6000000/, "") assert_in_out_err([env, "-w", "-e", "exit"], "", [], /RUBY_GC_MALLOC_LIMIT_MAX=16000000/, "") assert_in_out_err([env, "-w", "-e", "exit"], "", [], /RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR=2.0/, "") + + env = { + "RUBY_GC_OLDSPACE_LIMIT" => "60000000", + "RUBY_GC_OLDSPACE_LIMIT_MAX" => "160000000", + "RUBY_GC_OLDSPACE_LIMIT_GROWTH_FACTOR" => "2.0" + } + assert_normal_exit("exit", "", :child_env => env) + assert_in_out_err([env, "-w", "-e", "exit"], "", [], /RUBY_GC_OLDSPACE_LIMIT=6000000/, "") + assert_in_out_err([env, "-w", "-e", "exit"], "", [], /RUBY_GC_OLDSPACE_LIMIT_MAX=16000000/, "") + assert_in_out_err([env, "-w", "-e", "exit"], "", [], /RUBY_GC_OLDSPACE_LIMIT_GROWTH_FACTOR=2.0/, "") end def test_profiler_enabled |