mirror of
https://github.com/ruby/ruby.git
synced 2025-08-16 05:59:00 +02:00
test_file.rb: fix noatime
* test/ruby/test_file.rb (TestFile#test_stat): fix noatime case. [ruby-core:77943] [Bug #12903] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0b8ab5b0a8
commit
c71a60c1dd
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sat Nov 5 10:07:18 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* test/ruby/test_file.rb (TestFile#test_stat): fix noatime case.
|
||||||
|
[ruby-core:77943] [Bug #12903]
|
||||||
|
|
||||||
Fri Nov 4 17:52:44 2016 Koichi Sasada <ko1@atdot.net>
|
Fri Nov 4 17:52:44 2016 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* gc.c (heap_page_resurrect): do not return tomb_pages when
|
* gc.c (heap_page_resurrect): do not return tomb_pages when
|
||||||
|
|
|
@ -358,6 +358,8 @@ class TestFile < Test::Unit::TestCase
|
||||||
sleep 2
|
sleep 2
|
||||||
File.write(path, "bar")
|
File.write(path, "bar")
|
||||||
sleep 2
|
sleep 2
|
||||||
|
File.read(path)
|
||||||
|
a0 = File.stat(path).atime
|
||||||
File.chmod(0644, path)
|
File.chmod(0644, path)
|
||||||
sleep 2
|
sleep 2
|
||||||
File.read(path)
|
File.read(path)
|
||||||
|
@ -369,7 +371,7 @@ class TestFile < Test::Unit::TestCase
|
||||||
if stat.birthtime != stat.ctime
|
if stat.birthtime != stat.ctime
|
||||||
assert_in_delta t0+4, stat.ctime.to_f, delta
|
assert_in_delta t0+4, stat.ctime.to_f, delta
|
||||||
end
|
end
|
||||||
unless /mswin|mingw/ =~ RUBY_PLATFORM
|
if a0 > stat.mtime
|
||||||
# Windows delays updating atime
|
# Windows delays updating atime
|
||||||
assert_in_delta t0+6, stat.atime.to_f, delta
|
assert_in_delta t0+6, stat.atime.to_f, delta
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue