[Dovecot] Test suite? Was [Dovecot-news] 1.0.rc21 released

Timo Sirainen tss at iki.fi
Tue Feb 6 16:59:14 UTC 2007


On Tue, 2007-02-06 at 10:33 -0600, Eric Rostetter wrote:
> Quoting Timo Sirainen <tss at iki.fi>:
> 
> > On 5.2.2007, at 17.27, Eric Rostetter wrote:
> >
> >> As I said, I wouldn't expect _you_ alone to implement a unit test  suite,
> >> as it would be way too big of a project.  But is is something the
> >> community could do for the CVS HEAD code, so it would be there for
> >> dovecot 2.x when that comes due.  But it is up to you if you want this
> >> or not.
> >
> > Well, sure a test suite would be nice. It would be also nice if
> > someone with some experience in them would create the beginnings of
> > it. I've some vague ideas about how it could work, but my past test
> > suite experience is pretty small.
> 
> I'm willing to help.  How best to start?  Should we discuss possible
> method on the list?  Or should someone (e.g. myself) just start with
> what they want to do, without discussion?  Or should we start private
> thread for this?  Or a new mailing list?

I think this mailing list is good enough for talking about it. That
allows other people to comment on it who wouldn't otherwise bother to
join a new list. And I don't think there are going to be that many
messages about it anyway :)

As for talking first vs. just doing it, I don't know. I'm not sure if I
have much comments about it, but probably best to show me early enough
what you've done in case there's something I really don't like :)

All of lib/ should be pretty easy to test with quite simple tests.

Testing all the code paths in lib-index will be a huge job. I think the
best way to do it would be to build some special index/log/cache files
for each test. Testing for race conditions could be done some day by
inserting some unittest_checkpoint("name"); calls in the code and
compiling with a special -DUNITTEST flag.

Testing lib-storage then.. Well, it's somewhat related to lib-index
since the index file and mail storage is synced at the same time. Also
maildir has a lot of race condition possibilities that can be difficult
to test.

I think lib-index and lib-storage tests are going to be the most useful
ones, since that's where the bugs usually have been. Don't bother adding
tests to master since I've already rewritten it (not yet in CVS).
login-common is also more or less rewritten. lib-auth will hopefully go
away too.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070206/2c096c9e/attachment.pgp 


More information about the dovecot mailing list