diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-25 22:32:35 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-25 22:32:35 +0000 |
commit | 32910b87812011d440fc0b40453774153d011840 (patch) | |
tree | 60c27b53d7721cc89bd6a8dabb068d99e2118b36 /test/io/wait | |
parent | 894847a5de4789fd4f34f5ab13e65def80c316cc (diff) | |
download | ruby-32910b87812011d440fc0b40453774153d011840.tar.gz |
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
Diffstat (limited to 'test/io/wait')
-rw-r--r-- | test/io/wait/test_io_wait_uncommon.rb | 8 |
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 |