[Python-Dev] Bizarre mtime behaviour
by Antoine Pitrou other posts by this author
Nov 1 2009 7:24AM messages near this date
Re: [Python-Dev] Integer behaviour in Python 2.6.4
|
Re: [Python-Dev] Bizarre mtime behaviour
Hello,
I wondered if someone had a clue about the following behaviour.
While debugging an erratic test_mailbox failure on RDM's buildbot (and other
machines), it turned out that the system sometimes set the wrong mtime on a
directory:
$ date && python -c 'import os; os.link("setup.py", "t/c")' && stat t && date
Sun Nov 1 09:49:04 EST 2009
File: `t'
Size: 144 Blocks: 0 IO Block: 4096 directory
Device: 811h/2065d Inode: 223152 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 1001/ pitrou) Gid: ( 1005/ pitrou)
Access: 2009-11-01 09:10:11.000000000 -0500
Modify: 2009-11-01 09:49:03.000000000 -0500
Change: 2009-11-01 09:49:03.000000000 -0500
Sun Nov 1 09:49:04 EST 2009
As you see above, the mtime for directory 't' is set to a full second before the
actual modification has happened.
Sprinkling traces of time.time() and os.path.getmtime() on Lib/mailbox.py shows
this is exactly what trips up test_mailbox. I've got posted a patch to fix it
(see issue #6896), but I would like to know if such OS behaviour is normal.
Regards
Antoine.
_______________________________________________
Python-Dev mailing list
Python-Dev@[...].org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/python-dev-ml%40maillist.acti
vestate.com
Thread:
Antoine Pitrou
Adam Olsen
Antoine Pitrou
Eric Smith
Robert Collins
Antoine Pitrou
|