[前][次][番号順一覧][スレッド一覧]

ruby-changes:40141

From: naruse <ko1@a...>
Date: Fri, 23 Oct 2015 00:00:28 +0900 (JST)
Subject: [ruby-changes:40141] naruse:r52222 (trunk): limit the number of FDs in a process for stress test

naruse	2015-10-23 00:00:13 +0900 (Fri, 23 Oct 2015)

  New Revision: 52222

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52222

  Log:
    limit the number of FDs in a process for stress test

  Modified files:
    trunk/test/ruby/test_io.rb
Index: test/ruby/test_io.rb
===================================================================
--- test/ruby/test_io.rb	(revision 52221)
+++ test/ruby/test_io.rb	(revision 52222)
@@ -1135,6 +1135,8 @@ class TestIO < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L1135
 
   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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]