Re lint

Henry Spencer henry at zoo.toronto.edu
Sun Mar 31 14:57:11 AEST 1991


In article <15638 at smoke.brl.mil> gwyn at smoke.brl.mil (Doug Gwyn) writes:
>-	1) lint
>-	2) compile on at least two different platforms ...
>-	3) link
>-	4) test
>-	...
>That's fairly reasonable.  I would also suggest, right after "lint",
>having one or more C portability experts review the source code...

Also, around the same time, have the author prepare a regression test,
and have that included in the review.  Every minute I've ever spent
writing regression tests has been richly repaid in bugs found and in
assurance that later changes have not introduced obvious bugs.

For those who don't know what a regression test is, it's a set of test
procedures and data that try to exercise the program fairly thoroughly,
plus a comparison procedure that checks the results against expected
results.  (It is important that the checking be automatic or nearly so.)
The initial regression test mostly tries to check out main cases and
boundary conditions; checking of error conditions is also good but can
be much harder to arrange.  Every time a bug is found in testing, data
that demonstrates it gets added to the regression test, so you can be
sure it hasn't come back.

And for extra credit, try convincing the suppliers of your compiler and
operating system to do the same.  God knows, few enough of them do it,
to judge by all the stupid bugs and reappearing bugs...
-- 
"The stories one hears about putting up | Henry Spencer @ U of Toronto Zoology
SunOS 4.1.1 are all true."  -D. Harrison|  henry at zoo.toronto.edu  utzoo!henry



More information about the Comp.lang.c mailing list