This implies that ordinary bug fix should have a unit test accompanying it.
But, unit tests are cumbersome when performed by hand and do not mean much if they
are not accumulated over time.
For integration of Netcat into OpenSolaris I have developed number of unit tests
(basically at least one for each command line option) and couple more after spotting some bugs in nc(1).
This means that nc(1) is ripe for having a test suite so the tests
can be performed automatically. This is tracked by RFE 6646967. The test suite
will live in onnv-stc2
gate which is hosted and maintained by OpenSolaris
To create a test suite one can choose between two frameworks: STF and
I have chosen the latter because I wanted to try something new and also because
CTI-TET seems to be the recommended framework these days.
The work on nc test suite has started during Christmas break 2007 and after
recovery from lost data
it is now in pretty stable state and ready for code review.
This is actually somewhat exciting because nc test suite is supposed to be the first OpenSolaris test
suite developed in the open.
So, if you're familiar with ksh scripting or CTI-TET framework (both not necessary)
you have unique chance to bash (not bash) my code ! Watch for official code review
announcement on the mailing list in the next couple of days.
Lastly, another philosophical food for thought:
Test suites are sets of programs and scripts which serve mainly one purpose - they should prevent bugs
from happening in the software they test. But, test suites are software too. Presence of bugs in test suites
is an annoying phenomenon. How to get rid of that one ?