From 26646186afbf474c75a3606a1c492fbc74575c2b Mon Sep 17 00:00:00 2001 From: shirosaki Date: Wed, 26 Jun 2013 12:21:21 +0000 Subject: * 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 --- ChangeLog | 6 ++++++ test/ruby/test_io.rb | 36 ++++++++++++++++++++---------------- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 00e838d9c6..5647a4caa9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Jun 26 21:01:22 2013 Hiroshi Shirosaki + + * 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 * lib/mkmf.rb: should use expanded values for header directories diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 9e6b14acee..04c384f086 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2661,22 +2661,26 @@ End ret end - 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; + 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 -- cgit v1.2.3