diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-11 05:56:43 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-11 05:56:43 +0000 |
commit | ec572a1171727d5570c337bf765b4f4ecdc3849d (patch) | |
tree | 460b9a2db59fc9d485688ede4a124e55c6f636d7 /test | |
parent | 5e69854daf356b5c76a764547b1d00c0bec3e777 (diff) | |
download | bundler-ec572a1171727d5570c337bf765b4f4ecdc3849d.tar.gz |
test_io.rb: fix IO#advise on aarch64-linux
* test/ruby/test_io.rb (test_advise, test_advise_pipe): fadvise on
aarch64-linux returns ESYS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_io.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index ad9e4fa08f..a237fa3b87 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2565,6 +2565,8 @@ End ret = assert_nothing_raised(lambda { os_and_fs(tf.path) }) { begin t.advise(adv, offset, len) + rescue Errno::ENOSYS + skip rescue Errno::EINVAL => e if /linux/ =~ RUBY_PLATFORM && (Etc.uname[:release].split('.').map(&:to_i) <=> [3,6]) < 0 next # [ruby-core:65355] tmpfs is not supported @@ -3005,8 +3007,8 @@ 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, Errno::ENOSYS) { r.advise(:willneed) } + assert_raise(Errno::ESPIPE, Errno::EINVAL, Errno::ENOSYS) { w.advise(:willneed) } end end if /linux/ =~ RUBY_PLATFORM |