Hi Massimo I did a little digging and I finally understand what’s happening and I could fix my testing problems (hopefully for good)…
1. When I ran the test, the “Running all tests against one server process.” failed to run the tests because Tcl didn’t find the librivet package and threw an error. Providing for this in my automation script solved the problem.-> I now run 130 tests ☺ 2. While I faked TclX’s kill, I didn’t fake the wait, which is also used, but within a catch, that’s why I never noticed. And that’s why I had the timing issues: my kill just needs to properly “wait” too ☺ To address both (for easier handling), I propose the following changes: for 1. I added a [puts stderr $::errorInfo] to show what goes wrong if the code provided for the test fails (this revealed the problem of the missing librivet) for 2. I porpose to get rid of TclX by providing a “waiting” Tcl implementation using [exec kill] and [exec ps]. (Yes, not particularly portable, but I don’t think the test run under Windows anyway, do they?.) Also, you currently send a QUIT signal to apache to kill the process, this is not very reliable for me. Also the TERM signal takes 1.5 seconds on average to kill the process (in my env) sometimes over 2 seconds, that’s why some of my tests fails. I changed the signal to KILL and the suite runs much faster now. A modified version of test/pachetest/apachetest.tcl and the corresponding patch is attached. Last but not least, I propose to drop the module test for the prefork mpm in tests/runtests.tcl so we can test w/o modification against both mpms… Thanks and best regards Ronnie -- We innovate. You win. http://netcetera.com Ronnie Brunner | ronnie.brun...@netcetera.com | T +41 44 297 59 79 | Netcetera AG | 8040 Zürich | Switzerland | http://netcetera.com | From: Massimo MANGHI [mailto:massimo.man...@unipr.it] Sent: Dienstag, 6. Februar 2018 21:01 To: Ronnie Brunner <ronnie.brun...@netcetera.com>; Massimo Manghi <massimo.man...@alice.it>; petas...@yahoo.gr Cc: rivet-dev@tcl.apache.org Subject: Re: Rivet 3.0.1 Thank you Ronnie, still the discrepancy between my PC and yours bothers me quite a bit. I would like to have more time to investigate, in the meanwhile would you sent over your error_log and output? Thank you -- Massimo Manghi ________________________________ Da: Ronnie Brunner <ronnie.brun...@netcetera.com<mailto:ronnie.brun...@netcetera.com>> Inviato: martedì 6 febbraio 2018 20:48 A: Massimo MANGHI; Massimo Manghi; petas...@yahoo.gr<mailto:petas...@yahoo.gr> Cc: rivet-dev@tcl.apache.org<mailto:rivet-dev@tcl.apache.org> Oggetto: RE: Rivet 3.0.1 Hi Massimo Sorry, I haven’t noticed your answer w/ the rc2 earlier. Thought it referred to George’s issue with the test suite… I have compared 3.0.1rc1 w/ 3.0.1rc2: they show the same result. Running tests now gives 38 failed tests for both. (I’m not sure why I got fewer errors when I tried initially. Could well be that some of it is and or was timing related, the machine I use is used by many and although virtualized, it’s not always under the same or even just similar load…) So I stand by the statement: it’s an improvement since 3.0.0, so nothing speaks against a release, but there is still something amiss. (No guarantee it’s not my somewhat homegrown environment: I compiled httpd as well as Tcl locally to have control over the versions and I refer to only those versions when testing. Great for testing different versions, but as I learned, the test suite currently runs on Tcl8.6 and http 2.4 only…. I use Tcl.8.6.6 and hddpt-2.4.27 currently) Regards Ronnie -- We innovate. You win. http://netcetera.com Ronnie Brunner | ronnie.brun...@netcetera.com<mailto:ronnie.brun...@netcetera.com> | T +41 44 297 59 79 | Netcetera AG | 8040 Zürich | Switzerland | http://netcetera.com | From: Massimo MANGHI [mailto:massimo.man...@unipr.it] Sent: Dienstag, 6. Februar 2018 18:33 To: Ronnie Brunner <ronnie.brun...@netcetera.com<mailto:ronnie.brun...@netcetera.com>>; Massimo Manghi <massimo.man...@alice.it<mailto:massimo.man...@alice.it>>; petas...@yahoo.gr<mailto:petas...@yahoo.gr> Cc: rivet-dev@tcl.apache.org<mailto:rivet-dev@tcl.apache.org> Subject: Re: Rivet 3.0.1 Hi Ronnie are your latest test results obtained from 3.0.1rc2? I fixed a problem that made the server fail in most cases, their are all OK for me now Another issue with your test output is the overall number of tests actually carried out: 83. I have 130 tests running and 3.0.1rc2 passes each and everyone on my PC. Why your test suite is avoiding ~50 tests? -- Massimo ________________________________ Da: Ronnie Brunner <ronnie.brun...@netcetera.com<mailto:ronnie.brun...@netcetera.com>> Inviato: martedì 6 febbraio 2018 17:05 A: Massimo MANGHI; Massimo Manghi; petas...@yahoo.gr<mailto:petas...@yahoo.gr> Cc: rivet-dev@tcl.apache.org<mailto:rivet-dev@tcl.apache.org> Oggetto: RE: Rivet 3.0.1 Hi Massimo My problem for the worker mpm is certainly not a blocker, as I never managed (actually, really tried) to run the tests for that mpm. I always tested exclusively against prefork, mainly because I thought the others aren’t supported yet. Also: The test result of Rivet 3.0.0 that I get in my setup is much worse than the result of 3.0.1. So 3.0.1 actually brings an improvement as previously, almost no tests worked. (I just reran my setup w/ 3.0.0 -> rivet.test: Total 83 Passed 4 Skipped 0 Failed 79) Hth and best regards Ronnie -- We innovate. You win. http://netcetera.com Ronnie Brunner | ronnie.brun...@netcetera.com<mailto:ronnie.brun...@netcetera.com> | T +41 44 297 59 79 | Netcetera AG | 8040 Zürich | Switzerland | http://netcetera.com | From: Massimo MANGHI [mailto:massimo.man...@unipr.it] Sent: Dienstag, 6. Februar 2018 16:29 To: Ronnie Brunner <ronnie.brun...@netcetera.com<mailto:ronnie.brun...@netcetera.com>>; Massimo Manghi <massimo.man...@alice.it<mailto:massimo.man...@alice.it>>; petas...@yahoo.gr<mailto:petas...@yahoo.gr> Cc: rivet-dev@tcl.apache.org<mailto:rivet-dev@tcl.apache.org> Subject: Re: Rivet 3.0.1 Should we consider this issue a reason for withholding 3.0.1? I think that as long as 2.2 is supported we may exploit the compatibility with 2.4. When 2.2 is deprecated we may proceed with the new macro definition. This is good example where having a versioning system like git or fossil could be handy. Can I start the vote for releasing 3.0.1? -- Massimo ________________________________ Da: Georgios Petasis <petas...@yahoo.gr<mailto:petas...@yahoo.gr>> Inviato: domenica 4 febbraio 2018 14:54 A: Massimo MANGHI; Ronnie Brunner; Massimo Manghi Cc: rivet-dev@tcl.apache.org<mailto:rivet-dev@tcl.apache.org> Oggetto: Re: Rivet 3.0.1 Dear Massimo, According to the documentation: https://httpd.apache.org/docs/2.4/developer/new_api_2_4.html We should also modify rivet.c to use AP_DECLARE_MODULE instead of "module AP_MODULE_DECLARE_DATA rivet_module = " we now have. I have tried it, and there was no difference (of course we must take care the old way is used in versions < 2.4 of apache). I tried to run the tests, but I am missing the TclX package. Where can I find its sources? In sourceforge? Best, George Στις 3/2/2018 20:52, ο Massimo Manghi έγραψε: > I've just uploaded to > www.rivetweb.org/~mxm/rivet<http://www.rivetweb.org/~mxm/rivet> a RC2 tar > archive > with a proposed patch of the problem that made most tests fail. > > The bug has surfaced when George introduced the APLOG_USE_MODULE in > mod_rivet.h, since also rivetlib/rivetPkgInit.c used it in order to > get the definition of the module globals. But since the generation of > the pkgIndex.tcl file takes place outside of mod_rivet the mk_pkgIndex > failed for rivetlib and became impossible to mod_rivet to find the > library. As as consequence the server failed because rivetlib is > loaded in the process of initializing a Rivet interpreter > > Actually the introduction of the macro was correct and it's was > librivet/rivetPkgInit.c duty to determine the ::rivet name space > pointer in a different and sane way. This is the crux of the patch > included in RC2 > > -- Massimo > > On 02/01/2018 01:07 PM, Ronnie Brunner wrote: >> Hi Massimo >> >> Attached the output (stout and sdterr) of running the test suite >> (including the compilation of rivet), the error_log and access_log >> from rivet-3.0.1/tests after running the test suite. >> >> I'm running a CentOS Linux release 7.1.1503 (Core) os for these >> tests, Tcl8.6.6 and httpd 2.4.27 with the worker mpm. The only >> modification to runtests.tcl was to remove the prefork module check, >> which obviously fails if you run the worker mpm. >> >> Let me know if you need anything else. >> >> Hth Ronnie >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > rivet-dev-unsubscr...@tcl.apache.org<mailto:rivet-dev-unsubscr...@tcl.apache.org> > For additional commands, e-mail: > rivet-dev-h...@tcl.apache.org<mailto:rivet-dev-h...@tcl.apache.org> > >
apachetest.tcl
Description: apachetest.tcl
--- apachetest.tcl 2016-09-09 18:19:36.000000000 +0200 +++ apachetest.tcl.new 2018-02-08 11:42:57.819621656 +0100 @@ -22,9 +22,26 @@ # with the right options. set auto_path [linsert $auto_path 0 [file dirname [info script]]] -package require Tclx package provide apachetest 0.1 +proc kill {signal pid} { + catch {exec kill -s $signal $pid} + after 100 + set i 100 + while {1} { + catch {exec ps -p $pid} out + if {[regexp $pid $out]} { + incr i 250 + after 250 + } else { + break + } + } + if {$i > 100} { + puts "Waiting [expr {$i/1000.0}] seconds until process was killed" + } +} + #package require http 2.4.5 source [file join [file dirname [info script]] http.tcl] @@ -134,17 +151,10 @@ puts "Apache started as PID $serverpid" } - if { [catch { uplevel $code } err] } { } + if { [catch { uplevel $code } err] } { puts stderr $::errorInfo } - # Kill and wait are the only reasons we need TclX. - # apache2 binary started with -X reacts to SIGQUIT and ignores TERM - kill QUIT $serverpid - catch { - set waitres [wait $serverpid] - if { $debug > 0 } { - puts $waitres - } - } + # apache2 binary started with -X reacts to SIGQUIT and ignores TERM, but KILL is most reliable + kill KILL $serverpid } # startserver - start the server with 'options'.
--------------------------------------------------------------------- To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org For additional commands, e-mail: rivet-dev-h...@tcl.apache.org