tests: skip test_extract_y2261 when FS rejects post-y2038 timestamps

On omniOS the test data now lives on ZFS (via TMPDIR=/var/tmp), and ZFS
rejects the year-2261 os.utime() with EOVERFLOW. Treat that as an
unsupported-filesystem condition and skip, rather than failing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Thomas Waldmann 2026-06-09 13:06:17 +02:00
parent b56107dfe4
commit 35eff1c91a
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -833,7 +833,14 @@ def test_extract_y2261(archivers, request):
create_regular_file(archiver.input_path, "file_y2261", contents=b"post y2038 test")
# 2261-01-01 00:00:00 UTC as a Unix timestamp (seconds).
time_y2261 = 9183110400
os.utime("input/file_y2261", (time_y2261, time_y2261))
try:
os.utime("input/file_y2261", (time_y2261, time_y2261))
except OSError as e:
if e.errno == errno.EOVERFLOW:
# some filesystems/platforms cannot store timestamps beyond y2038
# (e.g. ZFS on omniOS rejects this with EOVERFLOW).
pytest.skip("filesystem cannot store post-y2038 timestamps")
raise
cmd(archiver, "repo-create", RK_ENCRYPTION)
cmd(archiver, "create", "test", "input")
with changedir("output"):