aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-30 05:30:21 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-30 05:30:21 +0000
commit699416841a6b3583a6a599a1c23b1a317f6da678 (patch)
tree302a5a9e1603dc0a82b215868ed59ca395f05cf8 /test
parent30c67cd3851461ba3848a78df59ce2c661fbbf17 (diff)
downloadruby-699416841a6b3583a6a599a1c23b1a317f6da678.tar.gz
Old linux's default hard rlimit_nofile is 1024
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_io.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index f907cde78a..12c4abdbe4 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -3067,13 +3067,20 @@ End
# 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