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

ruby-changes:52332

From: normal <ko1@a...>
Date: Sun, 26 Aug 2018 07:32:39 +0900 (JST)
Subject: [ruby-changes:52332] normal:r64540 (trunk): test/io/wait/test_io_wait_uncommon.rb: relax /dev/random check

normal	2018-08-26 07:32:35 +0900 (Sun, 26 Aug 2018)

  New Revision: 64540

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

  Log:
    test/io/wait/test_io_wait_uncommon.rb: relax /dev/random check
    
    Too many machines lack entropy to have a usable /dev/random.  I
    had similar problems on my system until I started using
    haveged(8), but we can't require that for CI.
    
    cf. https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-trunk/log/20180825T213003Z.fail.html.gz

  Modified files:
    trunk/test/io/wait/test_io_wait_uncommon.rb
Index: test/io/wait/test_io_wait_uncommon.rb
===================================================================
--- test/io/wait/test_io_wait_uncommon.rb	(revision 64539)
+++ test/io/wait/test_io_wait_uncommon.rb	(revision 64540)
@@ -59,7 +59,13 @@ class TestIOWaitUncommon < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/test/io/wait/test_io_wait_uncommon.rb#L59
   end
 
   def test_wait_readable_random
-    check_dev 'random'
+    File.open('/dev/random') do |fp|
+      assert_nothing_raised do
+        fp.wait_readable(0)
+      end
+    end
+  rescue SystemCallError => e
+    skip "/dev/random could not be opened #{e.message} (#{e.class})"
   end
 
   def test_wait_readable_zero

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

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