diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-22 15:00:13 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-22 15:00:13 +0000 |
commit | 0e3b5b68ca447cc6982b62a417ae0cf24e4810ba (patch) | |
tree | 156c729150e3ddbad4ed3e245024e7ee81a032ba /test/ruby | |
parent | 63bad6f07e6078117334f701ef5ba70f4344da80 (diff) | |
download | ruby-0e3b5b68ca447cc6982b62a417ae0cf24e4810ba.tar.gz |
limit the number of FDs in a process for stress test
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_io.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 2983826e9d..a5503cad8f 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1135,6 +1135,8 @@ class TestIO < Test::Unit::TestCase def test_dup_many ruby('-e', <<-'End') {|f| + lim = Process.getrlimit(Process::RLIMIT_NOFILE)[0] + Process.setrlimit(Process::RLIMIT_NOFILE, [lim, 1024].min) ok = 0 a = [] begin |