[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Testing (was: Re: dpkg 2.0?)


On Tue, Oct 10, 2006 at 06:20:45PM +0100, Ian Jackson wrote:
> [...]
> I think I have generally less of a high opinion of testing in areas
> where we have high levels of expertise.
> My experience as upstream maintainer for adns (which has a pretty
> comprehensive regression test suite) doesn't encourage me to think
> highly of tests: the fact that adns testing is done with a regression
> suite has not ever prevented me from shipping a bug.

    Of course. Nothing prevents you from shipping bugs :-) But it lowers the
bug count, and that's the point.

> Of course ad-hoc testing has caught bugs, and usually I would add the ad-hoc
> test for a change to the test suite, but it's not clear what the value of
> the tests _as regression tests_ is.

    OK. My experience has shown me that, when using tests, you catch enough
bugs when refactoring or adding new features to be valuable. And, I feel more
confident about changing the code so _I do more refactoring_, and thus the
code tends to be cleaner. But then, perhaps systems programming is not so
testing-friendly as the typical bussiness custom development, I don't know :-?

    Anyway, I assume that you prefer having them to _not_ having them, right?
At least if someone else writes the testing framework and the tests :-)

> >     I don't know about you, but I'm _very afraid_ of touching badly
> > written C code without any "safety net". Especially if that code
> > belongs to the most important program in Debian.
> I think I can safely say that, with the code for dpkg in front to me,
> I am generally able to determine both the intended and actual
> behaviours, and able to produce correct changes.

    Hmmmm... OK. I don't think I feel so much confidence in general (about
understanding big chunks of code, I mean :-P ), so perhaps my development
style is more test-friendly (or more bug-friendly, and thus easier to get
advantage from testing).

> But perhaps you have misunderstood what I mean by `overhaul'.  I don't
> propose to generate a flag day with a hugely different set of code.
> Rather, the way to do the overhaul would be as a series of changes
> each of which fixes a particular set of problems; after each change is
> made, we can stop and see how we're doing.

    OK. I would feel better having tests before the refactoring anyway. But I
guess I just meant that it's better to begin testing sooner than later.

    So... I'm already making changes to make it easier to write tests (and to
make the output clearer, and such), I hope interested developers can start
using it soon...


Esteban Manchado Velázquez <zoso@debian.org>
EuropeSwPatentFree - http://EuropeSwPatentFree.hispalinux.es
Help spread it through the Net in signatures, webpages, whatever!

Attachment: signature.asc
Description: Digital signature

Reply to: