This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skip.montanaro
Recipients skip.montanaro
Date 2014-05-12.16:48:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CANc-5Uwwdg6YrkjAf6CsUaSj35OjpEmyru3vtSAz4QMMo7E8Dw@mail.gmail.com>
In-reply-to
Content
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
History
Date User Action Args
2014-05-12 16:48:28skip.montanarosetrecipients: + skip.montanaro
2014-05-12 16:48:28skip.montanarolinkissue21483 messages
2014-05-12 16:48:28skip.montanarocreate