File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -616,6 +616,18 @@ def test_add_file_after_2107(self):
616
616
except OverflowError :
617
617
self .skipTest ('Host fs cannot set timestamp to required value.' )
618
618
619
+ mtime_ns = os .stat (TESTFN ).st_mtime_ns
620
+ if mtime_ns != (4386268800 * 10 ** 9 ):
621
+ # XFS filesystem is limited to 32-bit timestamp, but the syscall
622
+ # didn't fail. Moreover, there is a VFS bug which returns
623
+ # a cached timestamp which is different than the value on disk.
624
+ #
625
+ # Test st_mtime_ns rather than st_mtime to avoid rounding issues.
626
+ #
627
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1795576
628
+ # https://bugs.python.org/issue39460#msg360952
629
+ self .skipTest (f"Linux VFS/XFS kernel bug detected: { mtime_ns = } " )
630
+
619
631
with zipfile .ZipFile (TESTFN2 , "w" ) as zipfp :
620
632
self .assertRaises (struct .error , zipfp .write , TESTFN )
621
633
You can’t perform that action at this time.
0 commit comments