From 632b1e9442d3d5ced2c51b71a85f8f9a47aa9aae Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 16 Dec 2015 02:36:12 +0000 Subject: [PATCH] test_io.rb: ignore not-implemented fadvice * test/ruby/test_io.rb (test_advise_pipe): ignore not-implemented fadvice(2) when it is present but not implemented, as IO#advice does nothing and raises no exceptions. [Feature #11806] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index ad9e4fa08f..bd92634785 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -3005,8 +3005,12 @@ End # we don't know if other platforms have a real posix_fadvise() with_pipe do |r,w| # Linux 2.6.15 and earlier returned EINVAL instead of ESPIPE - assert_raise(Errno::ESPIPE, Errno::EINVAL) { r.advise(:willneed) } - assert_raise(Errno::ESPIPE, Errno::EINVAL) { w.advise(:willneed) } + assert_raise(Errno::ESPIPE, Errno::EINVAL) { + r.advise(:willneed) or skip "fadvice(2) is not implemented" + } + assert_raise(Errno::ESPIPE, Errno::EINVAL) { + w.advise(:willneed) or skip "fadvice(2) is not implemented" + } end end if /linux/ =~ RUBY_PLATFORM