diff options
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r-- | test/ruby/test_io.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index e12cf4adab..92f7f6b46f 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2486,7 +2486,15 @@ End [[0,0], [0, 20], [400, 2]].each do |offset, len| open(tf.path) do |t| ret = assert_nothing_raised(lambda { os_and_fs(tf.path) }) { - t.advise(adv, offset, len) + begin + t.advise(adv, offset, len) + rescue Errno::EINVAL + if /linux/ =~ RUBY_PLATFORM && (Etc.uname[:release].split('.').map(&:to_i) <=> [3,6]) < 0 + next # [ruby-core:65355] tmpfs is not supported + else + retry + end + end } assert_nil(ret) assert_raise(ArgumentError, "superfluous arguments") do |