diff options
-rw-r--r-- | spec/ruby/core/file/utime_spec.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/ruby/core/file/utime_spec.rb b/spec/ruby/core/file/utime_spec.rb index 96627b1fc6..19cb80d5f8 100644 --- a/spec/ruby/core/file/utime_spec.rb +++ b/spec/ruby/core/file/utime_spec.rb @@ -72,13 +72,17 @@ describe "File.utime" do platform_is :linux do platform_is wordsize: 64 do - it "allows Time instances in the far future to set mtime and atime (but some filesystems limit it up to 2446-05-10)" do + it "allows Time instances in the far future to set mtime and atime (but some filesystems limit it up to 2446-05-10 or 2038-01-19)" do # https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout#Inode_Timestamps # "Therefore, timestamps should not overflow until May 2446." + # https://lwn.net/Articles/804382/ + # "On-disk timestamps hitting the y2038 limit..." + # The problem seems to be being improved, but currently it actually fails on XFS on RHEL8 + # https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel8/ruby-master/log/20201112T123004Z.fail.html.gz time = Time.at(1<<44) File.utime(time, time, @file1) - [559444, 2446].should.include? File.atime(@file1).year - [559444, 2446].should.include? File.mtime(@file1).year + [559444, 2446, 2038].should.include? File.atime(@file1).year + [559444, 2446, 2038].should.include? File.mtime(@file1).year end end end |