New submission from Skip Montanaro: I got a strange error during "make test" in a fresh build (hg clone ; ./configure ; make ; make test)
Traceback (most recent call last): File "Lib/test/test_import.py", line 293, in test_timestamp_overflow os.utime(source, (2 ** 33 - 5, 2 ** 33 - 5)) OSError: [Errno 22] Invalid argument It took me a little while to figure out what was wrong. A simple check succeeded: >>> import os >>> os.utime("/tmp/trash", (2 ** 33 - 5, 2 ** 33 - 5)) >>> 2**33-5 8589934587 After a bit of poking around, I realized test.support.TESTFN is on an NFS filesystem in my work environment: >>> import importlib >>> from test.support import TESTFN >>> TESTFN '@test_31576_tmp' >>> import sys >>> sys.path.insert(0, os.curdir) >>> source = TESTFN + ".py" >>> compiled = importlib.util.cache_from_source(source) >>> compiled '__pycache__/@test_31576_tmp.cpython-35.pyc' >>> open(source, 'w') <_io.TextIOWrapper name='@test_31576_tmp.py' mode='w' encoding='ANSI_X3.4-1968'> >>> source '@test_31576_tmp.py' >>> os.path.getmtime(source) 1399912946.9349897 >>> 2**33-5 8589934587 >>> os.utime(source, (2 ** 33 - 5, 2 ** 33 - 5)) Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: [Errno 22] Invalid argument >>> os.utime("/tmp/trash", (2 ** 33 - 5, 2 ** 33 - 5)) >>> os.curdir '.' >>> os.getcwd() '/home/skipm/3rdParty/python/cpython' >>> blade% df -h . Filesystem Size Used Avail Use% Mounted on nfshost3:/global/export/home/skipm 2.1T 1.5T 639G 71% /home/skipm Should this test be skipped on NFS-mounted filesystems? Or should the test environment try to insure TESTFN is created on a local filesystem? Skip ---------- messages: 218336 nosy: skip.montanaro priority: normal severity: normal status: open title: Skip os.utime() test on NFS? _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21483> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com