ruby-changes:13135
From: nobu <ko1@a...>
Date: Sun, 13 Sep 2009 11:44:01 +0900 (JST)
Subject: [ruby-changes:13135] Ruby:r24886 (trunk): * test/ruby/test_process.rb (test_rlimit_value): rlim_max may be
nobu 2009-09-13 11:43:52 +0900 (Sun, 13 Sep 2009) New Revision: 24886 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24886 Log: * test/ruby/test_process.rb (test_rlimit_value): rlim_max may be higher than rlim_cur. Modified files: trunk/test/ruby/test_process.rb Index: test/ruby/test_process.rb =================================================================== --- test/ruby/test_process.rb (revision 24885) +++ test/ruby/test_process.rb (revision 24886) @@ -110,21 +110,21 @@ with_tmpchdir do s = run_in_child(<<-'End') cur, max = Process.getrlimit(:NOFILE) - Process.setrlimit(:NOFILE, max-10) + Process.setrlimit(:NOFILE, [max-10, cur].min) begin Process.setrlimit(:NOFILE, :INFINITY) rescue Errno::EPERM - exit 1 + exit false end End assert_not_equal(0, s.exitstatus) s = run_in_child(<<-'End') cur, max = Process.getrlimit(:NOFILE) - Process.setrlimit(:NOFILE, max-10) + Process.setrlimit(:NOFILE, [max-10, cur].min) begin Process.setrlimit(:NOFILE, "INFINITY") rescue Errno::EPERM - exit 1 + exit false end End assert_not_equal(0, s.exitstatus) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/