ITK/Procedure for Contributing Bug Fixes: Difference between revisions

From KitwarePublic
< ITK
Jump to navigationJump to search
No edit summary
Line 12: Line 12:


* http://public.kitware.com/Bug/my_view_page.php
* http://public.kitware.com/Bug/my_view_page.php
*
 
The bug report should be very clear, and when possible it should be accompanied with a small piece of code (and data) that permits to easily replicate the problem.


== Add a test if necessary ==
== Add a test if necessary ==

Revision as of 15:32, 26 December 2007

The Sad Truth

Most bugs are introduced as secondary effects from attempts to fix other bugs


This procedure is intended to prevent such secondary effects from happening.

Steps

Enter a bug report

The bug report should be very clear, and when possible it should be accompanied with a small piece of code (and data) that permits to easily replicate the problem.

Add a test if necessary

When a bug is found, the following questions should be raised

  Why wasn't it found before?

The most likely answer is that we were missing a test for the specific case in which the bug is visible. In other words, the bug passed unnoticed due to the lack of testing some special case.

Therefore a test for that specific case must be added, before attempting to fix the bug. This test will ensure that once the test is fixed, it will never reappear without being noticed.

As soon as the test is added, it will be failing, showing that the test actually detects the problem.

Fix the code in your local build

Modify the code of your local build until the new test is passing.

Submit an experimental build

This is necessary for detecting secondary effects that may result from the code fixes.

It is IMPOSSIBLE to anticipate secondary effects. The code modifications that seem to be the most innocuous, commonly result in plenty of secondary effects. Do not rely on your "mental compilation" skills. The only way to verify that the "code fix" doesn't break something else is to actually run a full Experimental build.

Verify that the code changes do not produce any compilation problems, or make any other tests fail.

Commit the code to CVS

  • Provide a CVS comment with a clear description of the bug fix
    • This comment should be clear enough for other developers to understand the problem five years from now.
  • Include in the CVS comment the number of the bug report in the bug tracker.

Link the CVS commit in the bug report

Wait for several continous builds

  • In order to verify that
    • the problems was fixed also in other platforms, and
    • the code fix doesn't produce compilation or link problems in other platforms
      • e.g. SGI, Borland, VS6,7,8, Icc 8,9, builds with shared libraries, and builds with Tcl, Python and Java wrapping.

Wait for a new Nightly submission

A full coverage of platforms requires to wait until the next day to see all the Nightly submissions.

Close the Bug

If the Nightly tests are clean (as far as this commit is concerned) then close the bug, and mark it as fixed.