#25 mtime tests fail with python 2.5

closed-fixed
None
5
2010-08-09
2008-08-09
No

======================================================================
FAIL: mbox timestamps should not change after semi-archival
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_archivemail.py", line 713, in testMixed
self.assertEqual(self.mtime, new_mtime)
AssertionError: 1218285951.9247789 != 1218285951.924777

======================================================================
FAIL: mbox timestamps should not change after no archival
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_archivemail.py", line 690, in testNew
self.assertEqual(self.mtime, new_mtime)
AssertionError: 1218285951.9328034 != 1218285951.932802

======================================================================
FAIL: mbox timestamps should not change after archival
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_archivemail.py", line 736, in testOld
self.assertEqual(self.mtime, new_mtime)
AssertionError: 1218285951.9367993 != 1218285951.936799

----------------------------------------------------------------------

Discussion

  • Nikolaus Schulz

    Nikolaus Schulz - 2008-08-14
    • assigned_to: nobody --> nikosch
     
  • Nikolaus Schulz

    Nikolaus Schulz - 2008-08-14

    Logged In: YES
    user_id=1594781
    Originator: NO

    That's interesting. I'm just learning about this; which operating system and which file system are you using? Does your system support the utimes(2) system call? I *think* Python should be able to restore the exact timestamp with utimes(2), if it is available, although the Python documentation nebulously warns that os.utime() might fail to set precise timestamps.

     
  • Nikolaus Schulz

    Nikolaus Schulz - 2008-08-15

    Logged In: YES
    user_id=1594781
    Originator: NO

    Okay, I can reproduce the test suite failure with xfs, and the odd 1ms timestamp skew. Thanks for the links, that was very useful. There is no real fix for this problem, I'll simply have to make the timestamp check in the test suite less strict, let it be by rounding or by disabling floating timestamps at all as per os.stat_float_times().

    It seems that the next POSIX standard will address the lacking precision of utimes(2) by adding the futimens(2) system call; futimens(2) is already implemented in Linux 2.6.22 and glibc 2.6. But of course, speaking about Python, that buys us nothing.

     
  • Nikolaus Schulz

    Nikolaus Schulz - 2008-10-26

    Fix committed to git-svn, will make it in archivemail 0.8.0

     
  • Nikolaus Schulz

    Nikolaus Schulz - 2010-08-09

    Closing all artifacts that are fixed in archivemail 0.8.0.

     
  • Nikolaus Schulz

    Nikolaus Schulz - 2010-08-09
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks