[issue9557] test_mailbox failure under a Windows VM
R. David Murray rdmur...@bitdance.com added the comment: It is reasonably likely that the attached patch will fix this. It also removes 3 seconds of fixed overhead from the test. -- keywords: +patch nosy: +r.david.murray stage: - patch review versions: +Python 2.7, Python 3.1, Python 3.3 Added file: http://bugs.python.org/file21391/test_mailbox_refresh.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9557] test_mailbox failure under a Windows VM
Antoine Pitrou pit...@free.fr added the comment: Well, on my new setup (Windows 7 VM with a Python checkout located on an SMB drive), the test sometimes passes and sometimes fails, regardless of the patch. I suspect that maybe maildir requires atomicity guarantees that a network FS won't provide. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9557] test_mailbox failure under a Windows VM
R. David Murray rdmur...@bitdance.com added the comment: That could be, certainly. The code is depending on the mtime having a resolution of at least one second. Try making the constant 61 instead of 60. If that doesn't work, try putting the mtime back a lot farther and see if that makes it work If it passes with that change then it could be the assumptions made by the code are also incorrect. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9557] test_mailbox failure under a Windows VM
Antoine Pitrou pit...@free.fr added the comment: Indeed, 61 seems to work. I don't understand the comment about one-second granularity, shouldn't it be one-minute? (or why do you need 61?) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9557] test_mailbox failure under a Windows VM
R. David Murray rdmur...@bitdance.com added the comment: Hmm. You are right, I wasn't thinking clearly, and I copied that mtime setting call from another test. Now I have no idea why 61 would work, unless the clock between your virthost and your smb server is off by a minute? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9557] test_mailbox failure under a Windows VM
Antoine Pitrou pit...@free.fr added the comment: Hmm. You are right, I wasn't thinking clearly, and I copied that mtime setting call from another test. Now I have no idea why 61 would work, unless the clock between your virthost and your smb server is off by a minute? No, they seem exactly synchronized. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9557] test_mailbox failure under a Windows VM
R. David Murray rdmur...@bitdance.com added the comment: Could you print out the mtime values that are being set, and the value of self._mbox._last_read? Or, rather, print out the result of calls to os.path.getmtime on the two directories after the mtime is changed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9557] test_mailbox failure under a Windows VM
Antoine Pitrou pit...@free.fr added the comment: before: os.path.getmtime('cur') = 1301075411.6942866 before: os.path.getmtime('new') = 1301075411.693287 after: os.path.getmtime('cur') = 1301075347.38 after: os.path.getmtime('new') = 1301075347.38 self._box._last_read = 1301075407.365 time.time() = 1301075408.395 (the test passed here) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9557] test_mailbox failure under a Windows VM
R. David Murray rdmur...@bitdance.com added the comment: Hmm. 411-61=350. Three seconds difference looks a little odd. But doesn't explain 60 vs 61 making the difference in the test. Can you change it back to 60 (or even less) and see what the values look like when the test fails? It is interesting (and possibly meaningful) that the last modified time 'before' appears to be in the future compared to time.time by 3-plus seconds. That would at least explain why the test fails without the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9557] test_mailbox failure under a Windows VM
Antoine Pitrou pit...@free.fr added the comment: Hmm. 411-61=350. Three seconds difference looks a little odd. But doesn't explain 60 vs 61 making the difference in the test. Can you change it back to 60 (or even less) and see what the values look like when the test fails? Hmm, 60 doesn't fail anymore so I changed it to 1 (!) and here is the result: before: os.path.getmtime('cur') = 1301078411.882165 before: os.path.getmtime('new') = 1301078411.8801715 after: os.path.getmtime('cur') = 1301078410.802999 after: os.path.getmtime('new') = 1301078410.802999 self._box._last_read = 1301078410.787 time.time() = 1301078411.818 (it fails obviously) It is interesting (and possibly meaningful) that the last modified time 'before' appears to be in the future compared to time.time by 3-plus seconds. That would at least explain why the test fails without the patch. Yep, although the drift is varying. Sometimes small, sometimes big. At this point I think it's just caused by my setup (the fact that VM and host aren't always synchronized - I once witnessed time advancing quicker on the VM than on the host! -, and the fact that a network FS is used). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9557] test_mailbox failure under a Windows VM
R. David Murray rdmur...@bitdance.com added the comment: All right, so how about I set the add factor to, say, 5, so that if things are mostly in sync it will succeed, and otherwise just ignore your failures :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9557] test_mailbox failure under a Windows VM
Roundup Robot devnull@devnull added the comment: New changeset 9a184d8211f5 by R David Murray in branch '3.1': #9557: eliminate 3 seconds of static overhead from test_mailbox. http://hg.python.org/cpython/rev/9a184d8211f5 New changeset 268ab32a89a9 by R David Murray in branch '3.2': Merge #9557: eliminate 3 seconds of static overhead from test_mailbox. http://hg.python.org/cpython/rev/268ab32a89a9 New changeset 03c7a83bbdd3 by R David Murray in branch 'default': Merge #9557: eliminate 3 seconds of static overhead from test_mailbox. http://hg.python.org/cpython/rev/03c7a83bbdd3 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9557] test_mailbox failure under a Windows VM
R. David Murray rdmur...@bitdance.com added the comment: Antoine agreed in IRC that this was an acceptable closure. -- stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9557] test_mailbox failure under a Windows VM
Changes by A.M. Kuchling li...@amk.ca: -- assignee: akuchling - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9557] test_mailbox failure under a Windows VM
New submission from Antoine Pitrou pit...@free.fr: I get this failure in test_mailbox under Windows XP running in a qemu virtual machine: == FAIL: test_reread (test.test_mailbox.TestMaildir) -- Traceback (most recent call last): File Z:\py3k\debug\lib\test\test_mailbox.py, line 764, in test_reread assert not refreshed() AssertionError -- -- assignee: akuchling components: Library (Lib), Tests messages: 113538 nosy: akuchling, pitrou priority: low severity: normal status: open title: test_mailbox failure under a Windows VM type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com