[Twisted-Python] Ticket Hall of Shame - Current Loser: Brian Warner
slamb at slamb.org
Fri Jan 12 11:54:10 MST 2007
On Jan 12, 2007, at 9:28 AM, Itamar Shtull-Trauring wrote:
> It's worth submitting fixes even if you don't attach a test, better
> no bug report at all. But we must have tests, whether written by
> submitter or Twisted developer, to actually commit a patch. Without
> tests we have no way of knowing:
> 1. whether a bug actually exists,
> 2. whether the patch fixes it, or
> 3. whether the patch introduces new bugs.
What about race conditions? I ran into such a problem a while back in
code using reactor.spawnProcess - seeing if it is a twisted bug and
if it's valid in current versions is on my todo list, but the
priority is low because of the insistence on having a test for
everything. I like spending my time on things I can actually get fixed.
Say I find it is a still-valid twisted bug. What am I supposed to do?
(1) create a test that likely fails by running many, many times. It'd
bog down the test suite.
(2) create a test that might fail sometime, maybe.
(3) add instrumentation to the main code solely for the purpose of
the test (break twisted's kneecap before the race).
(4) just say "clearly[*] if event A happens between lines X and Y,
then it is handled improperly."
I prefer #4.
[*] Of course, this word is a big lie that we inflict on people
because others have done it to us. As one of my favorite physics
professors would say, "clearly" means "be careful here".
Scott Lamb <http://www.slamb.org/>
More information about the Twisted-Python