diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-13 02:43:52 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-13 02:43:52 +0000 |
commit | 35e17cbe214a6cd81122aa1a8dfa8c0d832f093d (patch) | |
tree | 0ef50b9f191636b0821caa824ba1a79346dcfa64 /test/ruby/test_process.rb | |
parent | 0cde80d36a498655f3a6cdc792130e7f39fbe776 (diff) | |
download | ruby-35e17cbe214a6cd81122aa1a8dfa8c0d832f093d.tar.gz |
* test/ruby/test_process.rb (test_rlimit_value): rlim_max may be
higher than rlim_cur.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_process.rb')
-rw-r--r-- | test/ruby/test_process.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 4e6097bbc1..752d28d62c 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -110,21 +110,21 @@ class TestProcess < Test::Unit::TestCase 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) |