test failure in testHomeDirectoryJob

Bug #882324 reported by Martin Pool
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Martin Pool

Bug Description

while testing https://code.launchpad.net/~mbp/launchpad/881237-dkim-error/+merge/80413

FAILURE: canonical.launchpad.utilities.ftests.test_gpghandler.TestImportKeyRing.testHomeDirectoryJob (subunit.RemotedTestCase)
----------------------------------------------------------------------
_StringException: Text attachment: traceback
------------
Traceback (most recent call last):
_StringException: librarian-log: {{{
2011-10-26 09:24:28+0530 [-] Log opened.
2011-10-26 09:24:28+0530 [-] twistd 11.1.0pre1 (/usr/bin/python2.6 2.6.5) starting up.
2011-10-26 09:24:28+0530 [-] reactor class: twisted.internet.pollreactor.PollReactor.
2011-10-26 09:24:28+0530 [-] FileUploadFactory starting on 49979
2011-10-26 09:24:28+0530 [-] Starting factory <canonical.librarian.libraryprotocol.FileUploadFactory instance at 0x4572a70>
2011-10-26 09:24:28+0530 [-] Site starting on 39966
2011-10-26 09:24:28+0530 [-] Starting factory <twisted.web.server.Site instance at 0x4561b90>
2011-10-26 09:24:28+0530 [-] FileUploadFactory starting on 59769
2011-10-26 09:24:28+0530 [-] Starting factory <canonical.librarian.libraryprotocol.FileUploadFactory instance at 0x4561680>
2011-10-26 09:24:28+0530 [-] Site starting on 41482
2011-10-26 09:24:28+0530 [-] Starting factory <twisted.web.server.Site instance at 0x4561b00>
2011-10-26 09:24:28+0530 [-] Not using upstream librarian
2011-10-26 09:24:28+0530 [-] daemon ready!
}}}

Traceback (most recent call last):
 File "/var/launchpad/test/lib/canonical/launchpad/utilities/ftests/test_gpghandler.py", line 173, in testHomeDirectoryJob
   self.assertTrue(now <= floor(os.path.getmtime(fname)))
AssertionError

that code looks inherently dangerous

Related branches

Revision history for this message
Robert Collins (lifeless) wrote :

the code seems appropriately guarded, unless time goes backwards. We're talking on irc about it.

summary: - timing-dependent spurious test failure in testHomeDirectoryJob
+ test failure in testHomeDirectoryJob
Revision history for this message
Martin Pool (mbp) wrote :

It's not as obviously racy as it may first appear, but there is something wrong. Perhaps it's bad rounding behaviour (perhaps due to different precision between the different calls) or perhaps the clock stepped back on the machine, or perhaps something about trying to change the time of a directory or symlink.

Martin Pool (mbp)
Changed in launchpad:
assignee: nobody → Martin Pool (mbp)
status: Triaged → In Progress
tags: added: qa-untestable spurious-test-failure
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
removed: qa-untestable
Changed in launchpad:
status: In Progress → Fix Committed
Martin Pool (mbp)
tags: added: qa-untestable
removed: qa-needstesting
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.