Some tests can fail without detection

Bug #425113 reported by William Grant
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Unassigned
Twisted
New
Unknown

Bug Description

Some tests can fail without the test suite noticing. This is probably a very bad thing. See bug #424797 for an example.

Revision history for this message
Jonathan Lange (jml) wrote :
Download full text (4.0 KiB)

The failure is a combination of two bugs in Twisted.

The first is that Twisted's result adapter object passes a thing that looks like the result of sys.exc_info(), but isn't quite the same. Zope recently has come to rely on more features of the third value of that tuple; features that Trial doesn't provide.

At some point, Zope raises:
    AttributeError: "'_Frame' object has no attribute 'f_locals'"

Here's the pdb stack:

/home/jml/src/launchpad/ec2test-karmic-bug-424197/bin/test(219)?()
-> result = testrunner.run(defaults)
  /home/jml/repos/lp-sourcedeps/eggs/zope.testing-3.8.1-py2.4.egg/zope/testing/testrunner/__init__.py(32)run()
-> failed = run_internal(defaults, args, script_parts=script_parts)
  /home/jml/repos/lp-sourcedeps/eggs/zope.testing-3.8.1-py2.4.egg/zope/testing/testrunner/__init__.py(45)run_internal()
-> runner.run()
  /home/jml/repos/lp-sourcedeps/eggs/zope.testing-3.8.1-py2.4.egg/zope/testing/testrunner/runner.py(136)run()
-> self.run_tests()
  /home/jml/repos/lp-sourcedeps/eggs/zope.testing-3.8.1-py2.4.egg/zope/testing/testrunner/runner.py(216)run_tests()
-> setup_layers, self.failures, self.errors)
  /home/jml/repos/lp-sourcedeps/eggs/zope.testing-3.8.1-py2.4.egg/zope/testing/testrunner/runner.py(374)run_layer()
-> return run_tests(options, tests, layer_name, failures, errors)
  /home/jml/repos/lp-sourcedeps/eggs/zope.testing-3.8.1-py2.4.egg/zope/testing/testrunner/runner.py(306)run_tests()
-> test(result)
  /home/jml/src/launchpad/ec2test-karmic-bug-424197/lib/twisted/trial/unittest.py(632)__call__()
-> return self.run(*args, **kwargs)
  /home/jml/src/launchpad/ec2test-karmic-bug-424197/lib/twisted/trial/unittest.py(956)run()
-> d = self.deferSetUp(None, result)
  /home/jml/src/launchpad/ec2test-karmic-bug-424197/lib/twisted/trial/unittest.py(659)deferSetUp()
-> errbackArgs=(result,))
  /home/jml/src/launchpad/package-permission-love/lib/twisted/internet/defer.py(186)addCallbacks()
-> self._runCallbacks()
  /home/jml/src/launchpad/package-permission-love/lib/twisted/internet/defer.py(328)_runCallbacks()
-> self.result = callback(self.result, *args, **kw)
  /home/jml/src/launchpad/ec2test-karmic-bug-424197/lib/twisted/trial/unittest.py(675)deferTestMethod()
-> errbackArgs=(result,))
  /home/jml/src/launchpad/package-permission-love/lib/twisted/internet/defer.py(186)addCallbacks()
-> self._runCallbacks()
  /home/jml/src/launchpad/package-permission-love/lib/twisted/internet/defer.py(328)_runCallbacks()
-> self.result = callback(self.result, *args, **kw)
  /home/jml/src/launchpad/ec2test-karmic-bug-424197/lib/twisted/trial/unittest.py(694)_ebDeferTestMethod()
-> result.addFailure(self, f)
  /home/jml/src/launchpad/ec2test-karmic-bug-424197/lib/twisted/trial/unittest.py(1162)addFailure()
-> self.original.addFailure(test, self._exc_info(fail))
> /home/jml/repos/lp-sourcedeps/eggs/zope.testing-3.8.1-py2.4.egg/zope/testing/testrunner/runner.py(714)addFailure()
-> exc_info)
  /home/jml/repos/lp-sourcedeps/eggs/zope.testing-3.8.1-py2.4.egg/zope/testing/testrunner/formatter.py(319)test_failure()
-> self.print_traceback("Failure in test %s" % test, exc_info)
  /home/jml/repos/lp-sourcedeps/eggs/zope.testing-3.8.1-py2.4.egg/zope/t...

Read more...

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I'm tempted to mark this Critical, it has to be said...

Changed in launchpad-foundations:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Diogo Matsubara (matsubara) wrote : Bug fixed by a commit
Changed in launchpad-foundations:
status: Triaged → Fix Committed
Changed in twisted:
status: Unknown → New
Gary Poster (gary)
Changed in launchpad-foundations:
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.