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

ruby-changes:41064

From: nobu <ko1@a...>
Date: Wed, 16 Dec 2015 11:36:28 +0900 (JST)
Subject: [ruby-changes:41064] nobu:r53139 (trunk): test_io.rb: ignore not-implemented fadvice

nobu	2015-12-16 11:36:12 +0900 (Wed, 16 Dec 2015)

  New Revision: 53139

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

  Log:
    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]

  Modified files:
    trunk/test/ruby/test_io.rb
Index: test/ruby/test_io.rb
===================================================================
--- test/ruby/test_io.rb	(revision 53138)
+++ test/ruby/test_io.rb	(revision 53139)
@@ -3005,8 +3005,12 @@ End https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L3005
     # 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
 

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

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