[前][次][番号順一覧][スレッド一覧]

ruby-changes:54285

From: normal <ko1@a...>
Date: Sat, 22 Dec 2018 17:08:08 +0900 (JST)
Subject: [ruby-changes:54285] normal:r66494 (trunk): test/ruby/test_thread.rb (test_fork_while_parent_locked): reduce threads

normal	2018-12-22 17:08:03 +0900 (Sat, 22 Dec 2018)

  New Revision: 66494

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66494

  Log:
    test/ruby/test_thread.rb (test_fork_while_parent_locked): reduce threads
    
    Reduce thread counts unconditionally for some CI systems with
    low limits..  And Solaris apparently lacks RLIMIT_NPROC, so we
    can't detect resource limits and scale the test appropriately.
    
    [ruby-core:90670] [Bug #15430]

  Modified files:
    trunk/test/ruby/test_thread.rb
Index: test/ruby/test_thread.rb
===================================================================
--- test/ruby/test_thread.rb	(revision 66493)
+++ test/ruby/test_thread.rb	(revision 66494)
@@ -1246,8 +1246,7 @@ q.pop https://github.com/ruby/ruby/blob/trunk/test/ruby/test_thread.rb#L1246
     failures = 0
     run = true
     errs = ''
-    nr = 50
-    nr /= 2 if Process.getrlimit(:NPROC)[0] <= 4096 # Bug 15430
+    nr = 25 # reduce if more SIGKILL in tests
     tmps = nr.times.map { Tempfile.new('Bug.15430.diagnosis') }
     thrs = nr.times.map do |_i|
       Thread.new(_i) do |i|
@@ -1276,7 +1275,7 @@ q.pop https://github.com/ruby/ruby/blob/trunk/test/ruby/test_thread.rb#L1275
     sleep 0.5
     run = false
     thrs.each(&:join)
-    assert_empty errs
+    assert_empty errs, "lower `nr' if SIGKILL because of RLIMIT_NPROC limit"
     assert_equal 0, failures, '[ruby-core:90312] [Bug #15383]'
   ensure
     tmps&.each(&:close!)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]