Skip to content

test_add_file_after_2107() fails on file systems that do not support timestamps after 2038 #154325

Description

@serhiy-storchaka

Bug report

test_zipfile.test_add_file_after_2107() skips itself if the host file system cannot represent a timestamp in 2108, but only catches OverflowError:

        try:
            os.utime(TESTFN, (ts, ts))
        except OverflowError:
            self.skipTest('Host fs cannot set timestamp to required value.')

On illumos os.utime() fails with EOVERFLOW for any timestamp that does not fit in 32 bits:

OSError: [Errno 79] Value too large for defined data type: '@test_2002_tmp'

This is a limitation of the on-disk file systems: both UFS and ZFS reject such timestamps, tmpfs accepts them. test_import already skips on this error.

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixes3.15pre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesOS-unsupportedtestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions