mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
0cde80d36a
commit
35e17cbe21
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue