From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 21 Jul 2026 07:47:07 +0000 (+0200) Subject: [3.14] gh-154325: Skip test_add_file_after_2107() if the file system rejects the... X-Git-Url: http://git.ipfire.org/index.cgi?a=commitdiff_plain;h=d0439d14881dbb47deac14fedb3ac4147ffcbea8;p=thirdparty%2FPython%2Fcpython.git [3.14] gh-154325: Skip test_add_file_after_2107() if the file system rejects the timestamp (GH-154328) (GH-154332) 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 63a2709b700d5532b8925caca5bc8b9437e7a1f3) Co-authored-by: Serhiy Storchaka Co-authored-by: Claude Opus 4.8 --- diff --git a/Lib/test/test_zipfile/test_core.py b/Lib/test/test_zipfile/test_core.py index ffed328b171f..85bc010fe007 100644 --- a/Lib/test/test_zipfile/test_core.py +++ b/Lib/test/test_zipfile/test_core.py @@ -1,6 +1,7 @@ import _pyio import array import contextlib +import errno import importlib.util import io import itertools @@ -654,6 +655,12 @@ class StoredTestsWithSourceFile(AbstractTestsWithSourceFile, os.utime(TESTFN, (ts, ts)) except OverflowError: self.skipTest('Host fs cannot set timestamp to required value.') + except OSError as exc: + # Some file systems (e.g. UFS and ZFS on illumos) do not + # support timestamps that do not fit in 32 bits. + if exc.errno != errno.EOVERFLOW: + raise + self.skipTest('Host fs cannot set timestamp to required value.') mtime_ns = os.stat(TESTFN).st_mtime_ns if mtime_ns != (4386268800 * 10**9):