summaryrefslogtreecommitdiff
path: root/test/ruby/test_io.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-22 15:00:13 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-22 15:00:13 +0000
commitb471c9d35abe9a9513f3751afa60ea959684a1fe (patch)
tree156c729150e3ddbad4ed3e245024e7ee81a032ba /test/ruby/test_io.rb
parent29a1905c7d8d8174c25d2c5de4c33bb5c2b55c61 (diff)
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/test_io.rb')
-rw-r--r--test/ruby/test_io.rb2
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