From 32910b87812011d440fc0b40453774153d011840 Mon Sep 17 00:00:00 2001 From: normal Date: Sat, 25 Aug 2018 22:32:35 +0000 Subject: 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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/io/wait/test_io_wait_uncommon.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/io/wait/test_io_wait_uncommon.rb b/test/io/wait/test_io_wait_uncommon.rb index d76be914a5..e7f222c578 100644 --- a/test/io/wait/test_io_wait_uncommon.rb +++ b/test/io/wait/test_io_wait_uncommon.rb @@ -59,7 +59,13 @@ class TestIOWaitUncommon < Test::Unit::TestCase 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 -- cgit v1.2.3