You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2021/09/07 08:52:23 UTC
svn commit: r1893011 - /httpd/httpd/trunk/test/time-sem.c
Author: ylavic
Date: Tue Sep 7 08:52:23 2021
New Revision: 1893011
URL: http://svn.apache.org/viewvc?rev=1893011&view=rev
Log:
test/time-sem.c: unlock the accept mutex before exiting (error conditions).
Modified:
httpd/httpd/trunk/test/time-sem.c
Modified: httpd/httpd/trunk/test/time-sem.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/time-sem.c?rev=1893011&r1=1893010&r2=1893011&view=diff
==============================================================================
--- httpd/httpd/trunk/test/time-sem.c (original)
+++ httpd/httpd/trunk/test/time-sem.c Tue Sep 7 08:52:23 2021
@@ -548,6 +548,7 @@ void main (int argc, char **argv)
exit (0);
} else if (pid == -1) {
perror ("fork");
+ accept_mutex_off ();
exit (1);
}
}
@@ -555,6 +556,7 @@ void main (int argc, char **argv)
/* a quick test to see that nothing is screwed up */
if (*shared_counter != 0) {
puts ("WTF! shared_counter != 0 before the children have been started!");
+ accept_mutex_off ();
exit (1);
}
Re: svn commit: r1893011 - /httpd/httpd/trunk/test/time-sem.c
Posted by "stefan@eissing.org" <st...@eissing.org>.
> Am 07.09.2021 um 22:04 schrieb Christophe JAILLET <ch...@wanadoo.fr>:
>
> Le 07/09/2021 à 10:52, ylavic@apache.org a écrit :
>> Author: ylavic
>> Date: Tue Sep 7 08:52:23 2021
>> New Revision: 1893011
>> URL: http://svn.apache.org/viewvc?rev=1893011&view=rev
>> Log:
>> test/time-sem.c: unlock the accept mutex before exiting (error conditions).
>> Modified:
>> httpd/httpd/trunk/test/time-sem.c
>
> Hi,
>
> just for my understanding, does anyone use these tests?
> Are they run on travis? If no, should they be?
>
> Same question, concerning the unitest framework (httpdunit)?
> This is a great idea, but it looks mostly unused.
I had a quick look since in mod_h2 I have some unit tests that may get transferred too. But then other things occupied my time.
>
> It tried to play with it a few years ago and found it quite hard to use, because most of our functions need some "context" (i.e. a request, a pool, a config, ...)
> I was wondering if implementing such unittest as a module would make sense?
> We could plug nearly anywhere with some hooks to have a meaningful context. We could also implement a new hook to let modules implement tests for functions that are not exported.
> All this done, it could be run from our perl test framework as any other module.
Hmm, that would be a neat way to solve the export restrictions. Build in maintainer mode only or some other define.
Re: svn commit: r1893011 - /httpd/httpd/trunk/test/time-sem.c
Posted by Christophe JAILLET <ch...@wanadoo.fr>.
Le 07/09/2021 à 10:52, ylavic@apache.org a écrit :
> Author: ylavic
> Date: Tue Sep 7 08:52:23 2021
> New Revision: 1893011
>
> URL: http://svn.apache.org/viewvc?rev=1893011&view=rev
> Log:
> test/time-sem.c: unlock the accept mutex before exiting (error conditions).
>
> Modified:
> httpd/httpd/trunk/test/time-sem.c
Hi,
just for my understanding, does anyone use these tests?
Are they run on travis? If no, should they be?
Same question, concerning the unitest framework (httpdunit)?
This is a great idea, but it looks mostly unused.
It tried to play with it a few years ago and found it quite hard to use,
because most of our functions need some "context" (i.e. a request, a
pool, a config, ...)
I was wondering if implementing such unittest as a module would make sense?
We could plug nearly anywhere with some hooks to have a meaningful
context. We could also implement a new hook to let modules implement
tests for functions that are not exported.
All this done, it could be run from our perl test framework as any other
module.
CJ