apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@rkbloom.net>
Subject Re: [PATCH] Re: apr_proc_mutex is broken
Date Tue, 19 Nov 2002 23:21:22 GMT


On 19 Nov 2002, Philip Martin wrote:

> <rbb@rkbloom.net> writes:
>
> > Follow my logic please.
>
> [snip explanation]
>
> I see, thanks.
>
> > The real fix for this problem is to fix the test code as I have stated
> > above so that it is a valid example of how to write APR code, and to fix
> > the library so that we register cleanups with a public function, and so
> > that apr_proc_mutex_child_init does the right thing in all cases.  I will
> > do the work later tonight (assuming my wife doesn't go into labor before
> > then) unless somebody beats me to it.
>
> I think the test should also be changed to better exercise the mutex
> behaviour, i.e. replace (*x)++ with "read, wait, increment, write".
> Had the test been written like this originally it would not have
> passed erroneously.  It may also help when/if someone ports APR to a
> new platform.

One of my projects is to re-implement the test suite using CuTest
(currently in the test directory).  I am about half way through.  Once I
have all of the current tests actually compiling and reporting useful
information, I will begin to crete more tests that really exercise APR.

The original goal for the APR test suite was that implementors could run
the suite and be sure that they had implemented the correct logic on their
platforms.  Unfortunately, the test suite has never really matured, so now
we have to play catch up.  :-(

Any help that people can give writing tests and porting the test suite is
always appreciated.  I am likely to re-write the CuTest internals soon,
because I am unhappy about how it does some stuff.  But, the API should
remain basically the same (although the names will most likely change).

Ryan


Mime
View raw message