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

ruby-changes:29607

From: nagachika <ko1@a...>
Date: Wed, 26 Jun 2013 23:09:02 +0900 (JST)
Subject: [ruby-changes:29607] nagachika:r41659 (ruby_2_0_0): merge revision(s) 41254,41655: [Backport #8519]

nagachika	2013-06-26 23:07:48 +0900 (Wed, 26 Jun 2013)

  New Revision: 41659

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

  Log:
    merge revision(s) 41254,41655: [Backport #8519]
    
    test_io.rb: fix test error
    
    * test/ruby/test_io.rb (TestIO#test_write_32bit_boundary): retry to
      remove the temporary file while EACCES occurs because of syncing in
      the system probably.  rescue ENOSPC from IO#tell.  [ruby-core:55457]
      [Bug #8519]
    * test/ruby/test_io.rb (TestIO#test_write_32bit_boundary): skip if
      writing a file is slow.
      [ruby-core:55541] [Bug #8519]

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/test/ruby/test_io.rb
    branches/ruby_2_0_0/version.h

Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 41658)
+++ ruby_2_0_0/ChangeLog	(revision 41659)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Wed Jun 26 23:05:34 2013  Hiroshi Shirosaki  <h.shirosaki@g...>
+
+	* test/ruby/test_io.rb (TestIO#test_write_32bit_boundary): skip if
+	  writing a file is slow.
+	  [ruby-core:55541] [Bug #8519]
+
 Wed Jun 26 22:42:36 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* lib/mkmf.rb: should use expanded values for header directories
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 41658)
+++ ruby_2_0_0/version.h	(revision 41659)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
 #define RUBY_RELEASE_DATE "2013-06-26"
-#define RUBY_PATCHLEVEL 243
+#define RUBY_PATCHLEVEL 244
 
 #define RUBY_RELEASE_YEAR 2013
 #define RUBY_RELEASE_MONTH 6
Index: ruby_2_0_0/test/ruby/test_io.rb
===================================================================
--- ruby_2_0_0/test/ruby/test_io.rb	(revision 41658)
+++ ruby_2_0_0/test/ruby/test_io.rb	(revision 41659)
@@ -2671,19 +2671,43 @@ End https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/test_io.rb#L2671
   def test_write_32bit_boundary
     bug8431 = '[ruby-core:55098] [Bug #8431]'
     make_tempfile {|t|
-      assert_separately(["-", bug8431, t.path], <<-"end;", timeout: 30)
-        msg = ARGV.shift
-        f = open(ARGV[0], "wb")
-        f.seek(0xffff_ffff)
-        begin
-          # this will consume very long time or fail by ENOSPC on a
-          # filesystem which sparse file is not supported
-          f.write('1')
-        rescue SystemCallError
-        else
-          assert_equal(0x1_0000_0000, f.tell, msg)
+      def t.close(unlink_now = false)
+        # TODO: Tempfile should deal with this delay on Windows?
+        # NOTE: re-opening with O_TEMPORARY does not work.
+        path = self.path
+        ret = super
+        if unlink_now
+          begin
+            File.unlink(path)
+          rescue Errno::ENOENT
+          rescue Errno::EACCES
+            sleep(2)
+            retry
+          end
         end
-      end;
+        ret
+      end
+
+      begin
+        assert_separately(["-", bug8431, t.path], <<-"end;", timeout: 30)
+          msg = ARGV.shift
+          f = open(ARGV[0], "wb")
+          f.seek(0xffff_ffff)
+          begin
+            # this will consume very long time or fail by ENOSPC on a
+            # filesystem which sparse file is not supported
+            f.write('1')
+            pos = f.tell
+          rescue Errno::ENOSPC
+            skip "non-sparse file system"
+          rescue SystemCallError
+          else
+            assert_equal(0x1_0000_0000, pos, msg)
+          end
+        end;
+      rescue Timeout::Error
+        skip "Timeout because of slow file writing"
+      end
     }
   end if /mswin|mingw/ =~ RUBY_PLATFORM
 end

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r41254,41655


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

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