summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-25 22:32:35 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-25 22:32:35 +0000
commit32910b87812011d440fc0b40453774153d011840 (patch)
tree60c27b53d7721cc89bd6a8dabb068d99e2118b36
parent894847a5de4789fd4f34f5ab13e65def80c316cc (diff)
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
-rw-r--r--test/io/wait/test_io_wait_uncommon.rb8
1 files changed, 7 insertions, 1 deletions
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