ruby-changes:46821
From: normal <ko1@a...>
Date: Sun, 28 May 2017 14:39:34 +0900 (JST)
Subject: [ruby-changes:46821] normal:r58936 (trunk): test/ruby/test_io.rb: adjust CPU usage check to 10%
normal 2017-05-28 14:39:29 +0900 (Sun, 28 May 2017) New Revision: 58936 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58936 Log: test/ruby/test_io.rb: adjust CPU usage check to 10% I miscalculated for r58934, since we sleep 100ms, and the worst possible case is 100 Hz in the kernel meaning we only have 10ms resolution. So, we need to increase our CPU percentage to >= 10% for this. This should be more than enough for our CI machines which have 300 Hz kernels [ruby-core:81429]: http://ci.rvm.jp/results/trunk-test@sasada-8core/1495942555 * test/ruby/test_io.rb (test_copy_stream_no_busy_wait): override default percentage Modified files: trunk/test/ruby/test_io.rb Index: test/ruby/test_io.rb =================================================================== --- test/ruby/test_io.rb (revision 58935) +++ test/ruby/test_io.rb (revision 58936) @@ -533,9 +533,10 @@ class TestIO < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L533 if have_nonblock? def test_copy_stream_no_busy_wait + msg = 'r58534 [ruby-core:80969] [Backport #13533]' IO.pipe do |r,w| r.nonblock = true - assert_cpu_usage_low('r58534 [ruby-core:80969] [Backport #13533]') do + assert_cpu_usage_low(msg, pct: 0.11) do th = Thread.new { IO.copy_stream(r, IO::NULL) } sleep 0.1 w.close -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/