You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2006/01/25 01:46:21 UTC

Re: svn commit: r371915 - in /perl/modperl/trunk/t: conf/extra.last.conf.in hooks/TestHooks/startup.pm

geoff@apache.org wrote:
> Author: geoff
> Date: Tue Jan 24 05:55:39 2006
> New Revision: 371915
> 
> URL: http://svn.apache.org/viewcvs?rev=371915&view=rev
> Log:
> add simple tests to make sure $ENV{MOD_PERL}
> and $ENV{MOD_PERL_API_VERSION} are set as soon
> as possible
> 
> Modified:
>     perl/modperl/trunk/t/conf/extra.last.conf.in
>     perl/modperl/trunk/t/hooks/TestHooks/startup.pm
> 
> Modified: perl/modperl/trunk/t/conf/extra.last.conf.in
> URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/t/conf/extra.last.conf.in?rev=371915&r1=371914&r2=371915&view=diff
> ==============================================================================
> --- perl/modperl/trunk/t/conf/extra.last.conf.in (original)
> +++ perl/modperl/trunk/t/conf/extra.last.conf.in Tue Jan 24 05:55:39 2006
> @@ -67,6 +67,13 @@
>  $TestDirective::perl::base_server = Apache2::PerlSections->server;
>  </Perl>
>  
> +<Perl >
> +# make sure that these are set at the earliest possible time
> +die '$ENV{MOD_PERL} not set!' unless $ENV{MOD_PERL};
> +die '$ENV{MOD_PERL_API_VERSION} not set!'
> +    unless $ENV{MOD_PERL_API_VERSION} == 2;
> +</Perl>
> +

The only issue here is that Apache ignores any failures in the mp land at 
the server startup and it'll still start regardless. But as we know this 
die shouldn't happen I guess it's OK. (and of course everybody observes 
error_log during the test suite run :)

-- 
_____________________________________________________________
Stas Bekman mailto:stas@stason.org  http://stason.org/
MailChannels: Assured Messaging(TM) http://mailchannels.com/
The "Practical mod_perl" book       http://modperlbook.org/
http://perl.apache.org/ http://perl.org/ http://logilune.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: svn commit: r371915 - in /perl/modperl/trunk/t: conf/extra.last.conf.in hooks/TestHooks/startup.pm

Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
> 
> Stas Bekman wrote:
> 
>>geoff@apache.org wrote:
>>
>>
>>>Author: geoff
>>>Date: Tue Jan 24 05:55:39 2006
>>>New Revision: 371915
>>>
>>>URL: http://svn.apache.org/viewcvs?rev=371915&view=rev
>>>Log:
>>>add simple tests to make sure $ENV{MOD_PERL}
>>>and $ENV{MOD_PERL_API_VERSION} are set as soon
>>>as possible
>>>
>>>Modified:
>>>    perl/modperl/trunk/t/conf/extra.last.conf.in
>>>    perl/modperl/trunk/t/hooks/TestHooks/startup.pm
>>>
>>>Modified: perl/modperl/trunk/t/conf/extra.last.conf.in
>>>URL:
>>>http://svn.apache.org/viewcvs/perl/modperl/trunk/t/conf/extra.last.conf.in?rev=371915&r1=371914&r2=371915&view=diff
>>>
>>>==============================================================================
>>>
>>>--- perl/modperl/trunk/t/conf/extra.last.conf.in (original)
>>>+++ perl/modperl/trunk/t/conf/extra.last.conf.in Tue Jan 24 05:55:39 2006
>>>@@ -67,6 +67,13 @@
>>> $TestDirective::perl::base_server = Apache2::PerlSections->server;
>>> </Perl>
>>> 
>>>+<Perl >
>>>+# make sure that these are set at the earliest possible time
>>>+die '$ENV{MOD_PERL} not set!' unless $ENV{MOD_PERL};
>>>+die '$ENV{MOD_PERL_API_VERSION} not set!'
>>>+    unless $ENV{MOD_PERL_API_VERSION} == 2;
>>>+</Perl>
>>>+
>>
>>
>>The only issue here is that Apache ignores any failures in the mp land
>>at the server startup and it'll still start regardless.
> 
> 
> that isn't what I observed - I put a die in there and the other place and
> the server didn't start.  granted, the error message wasn't all that
> informative, but it did keep the server from starting... at least with the
> apache I tested :)

Ah, of course, it does respect failures during the config phase, but 
ignores them in post_config, open_logs and child_init. So your patch is 
just perfect, Geoff.

>>But as we know
>>this die shouldn't happen I guess it's OK. (and of course everybody
>>observes error_log during the test suite run :)
> 
> 
> actually, I couldn't get the open_logs handler to spit errors to the
> error_log, which I guess is kinda the risk you run when messing around with
> that phase...

Probably because it's not yet open, it's open only on restart. Most of our 
code here at mailchannels we skip the init on the server startup, and only 
run it on the restart, when error_log is available.

-- 
_____________________________________________________________
Stas Bekman mailto:stas@stason.org  http://stason.org/
MailChannels: Assured Messaging(TM) http://mailchannels.com/
The "Practical mod_perl" book       http://modperlbook.org/
http://perl.apache.org/ http://perl.org/ http://logilune.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: svn commit: r371915 - in /perl/modperl/trunk/t: conf/extra.last.conf.in hooks/TestHooks/startup.pm

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Stas Bekman wrote:
> geoff@apache.org wrote:
> 
>> Author: geoff
>> Date: Tue Jan 24 05:55:39 2006
>> New Revision: 371915
>>
>> URL: http://svn.apache.org/viewcvs?rev=371915&view=rev
>> Log:
>> add simple tests to make sure $ENV{MOD_PERL}
>> and $ENV{MOD_PERL_API_VERSION} are set as soon
>> as possible
>>
>> Modified:
>>     perl/modperl/trunk/t/conf/extra.last.conf.in
>>     perl/modperl/trunk/t/hooks/TestHooks/startup.pm
>>
>> Modified: perl/modperl/trunk/t/conf/extra.last.conf.in
>> URL:
>> http://svn.apache.org/viewcvs/perl/modperl/trunk/t/conf/extra.last.conf.in?rev=371915&r1=371914&r2=371915&view=diff
>>
>> ==============================================================================
>>
>> --- perl/modperl/trunk/t/conf/extra.last.conf.in (original)
>> +++ perl/modperl/trunk/t/conf/extra.last.conf.in Tue Jan 24 05:55:39 2006
>> @@ -67,6 +67,13 @@
>>  $TestDirective::perl::base_server = Apache2::PerlSections->server;
>>  </Perl>
>>  
>> +<Perl >
>> +# make sure that these are set at the earliest possible time
>> +die '$ENV{MOD_PERL} not set!' unless $ENV{MOD_PERL};
>> +die '$ENV{MOD_PERL_API_VERSION} not set!'
>> +    unless $ENV{MOD_PERL_API_VERSION} == 2;
>> +</Perl>
>> +
> 
> 
> The only issue here is that Apache ignores any failures in the mp land
> at the server startup and it'll still start regardless.

that isn't what I observed - I put a die in there and the other place and
the server didn't start.  granted, the error message wasn't all that
informative, but it did keep the server from starting... at least with the
apache I tested :)

> But as we know
> this die shouldn't happen I guess it's OK. (and of course everybody
> observes error_log during the test suite run :)

actually, I couldn't get the open_logs handler to spit errors to the
error_log, which I guess is kinda the risk you run when messing around with
that phase...

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org