Bug #467: Failure: test_rlimit_value(TestProcess)
http://redmine.ruby-lang.org/issues/show/467

起票者: Kazuhiro NISHIYAMA
ステータス: Open, 優先度: Normal

ruby 1.9.0 (2008-08-21 revision 18741) [powerpc-darwin9.4.0]
の環境でtest_rlimit_value(TestProcess)がFailureになります。

 61) Failure:
test_rlimit_value(TestProcess) [/Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/test/ruby/test_process.rb:111]:
<Errno::EPERM> exception expected but was
Class: <Errno::EINVAL>
Message: <"Invalid argument - setrlimit">
---Backtrace---
/Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/test/ruby/test_process.rb:111:in `setrlimit'
/Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/test/ruby/test_process.rb:111:in `block in test_rlimit_value'
/Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/test/ruby/test_process.rb:111:in `test_rlimit_value'
---------------


以下のパッチで通るようになりますが、問題ないでしょうか?

Index: test/ruby/test_process.rb
===================================================================
--- test/ruby/test_process.rb	(revision 18753)
+++ test/ruby/test_process.rb	(working copy)
@@ -108,8 +108,8 @@
   def test_rlimit_value
     return unless rlimit_exist?
     assert_raise(ArgumentError) { Process.setrlimit(:CORE, :FOO) }
-    assert_raise(Errno::EPERM) { Process.setrlimit(:NOFILE, :INFINITY) }
-    assert_raise(Errno::EPERM) { Process.setrlimit(:NOFILE, "INFINITY") }
+    assert_raise(Errno::EPERM, Errno::EINVAL) { Process.setrlimit(:NOFILE, :INFINITY) }
+    assert_raise(Errno::EPERM, Errno::EINVAL) { Process.setrlimit(:NOFILE, "INFINITY") }
   end
 
   TRUECOMMAND = [RUBY, '-e', '']


----------------------------------------
http://redmine.ruby-lang.org