Skip to content

Commit

Permalink
Old linux's default hard rlimit_nofile is 1024
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nurse committed Oct 30, 2015
1 parent 068f312 commit a4a29af
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/ruby/test_io.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3067,13 +3067,20 @@ def test_io_select_with_many_files
# Unfortunately, ruby doesn't export FD_SETSIZE. then we assume it's 1024.
fd_setsize = 1024
# try to raise RLIM_NOFILE to >FD_SETSIZE
begin
Process.setrlimit(Process::RLIMIT_NOFILE, fd_setsize+10)
rescue Errno::EPERM
exit 0
end
tempfiles = []
(0..fd_setsize+1).map {|i|
tempfiles << Tempfile.open("test_io_select_with_many_files")
}
IO.select(tempfiles)
}, bug8080, timeout: 30, rlimit_nofile: 1024+10
}, bug8080, timeout: 30
end if defined?(Process::RLIMIT_NOFILE)

def test_read_32bit_boundary
Expand Down

0 comments on commit a4a29af

Please sign in to comment.