* test/ruby/test_io.rb (TestIO#test_write_32bit_boundary): skip if

writing a file is slow.
  [ruby-core:55541] [Bug #8519]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shirosaki 2013-06-26 12:21:21 +00:00
parent 70658c387d
commit 26646186af
2 changed files with 26 additions and 16 deletions

View File

@ -1,3 +1,9 @@
Wed Jun 26 21:01:22 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
* 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 16:42:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> Wed Jun 26 16:42:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/mkmf.rb: should use expanded values for header directories * lib/mkmf.rb: should use expanded values for header directories

View File

@ -2661,22 +2661,26 @@ End
ret ret
end end
assert_separately(["-", bug8431, t.path], <<-"end;", timeout: 30) begin
msg = ARGV.shift assert_separately(["-", bug8431, t.path], <<-"end;", timeout: 30)
f = open(ARGV[0], "wb") msg = ARGV.shift
f.seek(0xffff_ffff) f = open(ARGV[0], "wb")
begin f.seek(0xffff_ffff)
# this will consume very long time or fail by ENOSPC on a begin
# filesystem which sparse file is not supported # this will consume very long time or fail by ENOSPC on a
f.write('1') # filesystem which sparse file is not supported
pos = f.tell f.write('1')
rescue Errno::ENOSPC pos = f.tell
skip "non-sparse file system" rescue Errno::ENOSPC
rescue SystemCallError skip "non-sparse file system"
else rescue SystemCallError
assert_equal(0x1_0000_0000, pos, msg) else
end assert_equal(0x1_0000_0000, pos, msg)
end; end
end;
rescue Timeout::Error
skip "Timeout because of slow file writing"
end
} }
end if /mswin|mingw/ =~ RUBY_PLATFORM end if /mswin|mingw/ =~ RUBY_PLATFORM
end end