mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_process.rb (test_rlimit_nofile): Don't limit
RLIMIT_NOFILE too small. This fix sporadic "[ASYNC BUG] thread_timer: select" on GNU/Linux. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1377f38c9b
commit
79c09eb597
2 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
Sat Apr 26 08:05:36 2014 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* test/ruby/test_process.rb (test_rlimit_nofile): Don't limit
|
||||
RLIMIT_NOFILE too small.
|
||||
This fix sporadic "[ASYNC BUG] thread_timer: select" on GNU/Linux.
|
||||
|
||||
Fri Apr 25 22:54:34 2014 Naohisa Goto <ngotogenome@gmail.com>
|
||||
|
||||
* lib/fileutils.rb (rmdir): rescue Errno::EEXIST in addition to
|
||||
|
|
|
@ -65,8 +65,11 @@ class TestProcess < Test::Unit::TestCase
|
|||
return unless rlimit_exist?
|
||||
with_tmpchdir {
|
||||
write_file 's', <<-"End"
|
||||
# if limit=0, this test freeze pn OpenBSD
|
||||
limit = /openbsd/ =~ RUBY_PLATFORM ? 1 : 0
|
||||
# Too small RLIMIT_NOFILE causes problems.
|
||||
# [OpenBSD] Setting to zero freezes this test.
|
||||
# [GNU/Linux] EINVAL on poll(). EINVAL on ruby's internal poll() ruby with "[ASYNC BUG] thread_timer: select".
|
||||
pipes = IO.pipe
|
||||
limit = pipes.map {|io| io.fileno }.min
|
||||
result = 1
|
||||
begin
|
||||
Process.setrlimit(Process::RLIMIT_NOFILE, limit)
|
||||
|
|
Loading…
Add table
Reference in a new issue