зеркало из https://github.com/github/ruby.git
* test/ruby/test_io.rb (TestIO#test_advise): added workaround of fadvise(2)
with tmpfs and old linux kernel. [ruby-core:65355][Bug #10313] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
bf1814d990
Коммит
66b6179ec1
|
@ -1,3 +1,8 @@
|
|||
Fri Oct 3 18:52:16 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
||||
|
||||
* test/ruby/test_io.rb (TestIO#test_advise): added workaround of fadvise(2)
|
||||
with tmpfs and old linux kernel. [ruby-core:65355][Bug #10313]
|
||||
|
||||
Fri Oct 3 18:22:45 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
||||
|
||||
* .travis.yml: Disabled to generate document on travis.
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче