Skip to content

Commit 2efd2b8

Browse files
miss-islingtonserhiy-storchakaclaude
authored
[3.13] gh-154325: Skip test_add_file_after_2107() if the file system rejects the timestamp (GH-154328) (GH-154333)
Some file systems (UFS and ZFS on illumos) reject timestamps that do not fit in 32 bits with EOVERFLOW instead of raising OverflowError. (cherry picked from commit 63a2709) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 0bc6595 commit 2efd2b8

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Lib/test/test_zipfile/test_core.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import _pyio
22
import array
33
import contextlib
4+
import errno
45
import importlib.util
56
import io
67
import itertools
@@ -644,6 +645,12 @@ def test_add_file_after_2107(self):
644645
os.utime(TESTFN, (ts, ts))
645646
except OverflowError:
646647
self.skipTest('Host fs cannot set timestamp to required value.')
648+
except OSError as exc:
649+
# Some file systems (e.g. UFS and ZFS on illumos) do not
650+
# support timestamps that do not fit in 32 bits.
651+
if exc.errno != errno.EOVERFLOW:
652+
raise
653+
self.skipTest('Host fs cannot set timestamp to required value.')
647654

648655
mtime_ns = os.stat(TESTFN).st_mtime_ns
649656
if mtime_ns != (4386268800 * 10**9):

0 commit comments

Comments
 (0)