Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestServer.pm
Philippe M. Chiasson wrote: On Thu, 2004-03-04 at 22:21 +, [EMAIL PROTECTED] wrote: geoff 2004/03/04 14:21:27 Modified:perl-framework/Apache-Test Changes perl-framework/Apache-Test/lib/Apache TestServer.pm Log: $ENV{APACHE_TEST_STARTUP_TIMEOUT} now supersedes -startup_timeout [...] What's the reason for this change? I almost always expect that command line arguments supercede env variables.. i.e. $ CVSROOT=foo cvs -d bar co foo Bad CVSROOT: `bar'. What you can see should win over what you can't see, IMO Yup, I've already pointed that out. I guess Geoff is not around. __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestServer.pm
$ENV{APACHE_TEST_STARTUP_TIMEOUT} now supersedes -startup_timeout [...] What's the reason for this change? it was a follow up from something on modperl@ I almost always expect that command line arguments supercede env variables.. i.e. $ CVSROOT=foo cvs -d bar co foo Bad CVSROOT: `bar'. What you can see should win over what you can't see, IMO yeah, I thought about this after committing it - it's definitely better the way it was. but it leaves mod_perl users in a lurch if they want to up the startup time. the better solution is probably to have ModPerl::TestRun look at %ENV before it sets the startup timeout. I'll fit that tomorrow unless you or stas beat me to it. --Geoff
Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestServer.pm
sub config_defines { +my $self = shift; + my @defines = (); for my $item (qw(useithreads)) { @@ -88,7 +90,9 @@ push @defines, -DPERL_\U$item; } -push @defines, map { -D$_ } split , shift-{config}-{vars}-{defines}; +if (my $defines = $self-{config}-{vars}-{defines}) { +push @defines, map { -D$_ } split , $defines; +} @defines; } were you seeing specific undef warnings? I ran it with and without the -defines option and didn't run across anything. was there a specific case where {vars}-{defines} wasn't initalized properly in the constructor (like t/SMOKE or something)? --Geoff
Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestServer.pm
it is a nice feature when it works, so i've re-enabled for linux only. for the other platforms in the current state, its better to wait 60 seconds if the server fails to start than to throw and error and die when it has successfully started.
Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestServer.pm
Doug MacEachern wrote: On Fri, 4 Jan 2002, Stas Bekman wrote: Any idea how to disable the END blocks inheritance in the forked child? my $Pid = $$; sub is_parent { $$ == $Pid; } my $pid = fork; exit unless $pid; END { print END pid=$$\n; return unless is_parent(); print stuff\n; } prints: END pid=2687 END pid=2688 stuff without 'return unless is_parent()' prints 'stuff' twice. nice :) I was thinking there is some magic way to tell Perl not to run END block. I've done with this: -eval 'END { +eval 'my $parent_pid = $$; + END { + return unless $$ == $parent_pid; # because of fork local $?; # preserve the exit status -- _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestServer.pm
On Sun, 6 Jan 2002, Stas Bekman wrote: I've done with this: -eval 'END { +eval 'my $parent_pid = $$; + END { + return unless $$ == $parent_pid; # because of fork ok. i thought is_parent() could be useful elsewhere, but i guess we could worry about that later if needed.
Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestServer.pm
On Mon, 7 Jan 2002, Stas Bekman wrote: I needed it TestRun, whereas the fork was happening in TestServer. So it was definitely easier to do it locally. are you saying the following patch would not work? Index: Apache-Test/lib/Apache/TestRun.pm === RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v retrieving revision 1.82 diff -u -r1.82 TestRun.pm --- Apache-Test/lib/Apache/TestRun.pm 6 Jan 2002 07:08:05 - 1.82 +++ Apache-Test/lib/Apache/TestRun.pm 6 Jan 2002 18:45:46 - @@ -248,6 +248,9 @@ $opts-{'run-tests'} ||= @$tests; } +my $parent_pid = $$; +sub is_parent { $$ == $parent_pid } + my $caught_sig_int = 0; sub install_sighandlers { @@ -276,9 +279,8 @@ #must eval to install this END block, otherwise it will #always run, a subclass might not want that -eval 'my $parent_pid = $$; - END { - return unless $$ == $parent_pid; # because of fork +eval 'END { + return unless is_parent(); # because of fork local $?; # preserve the exit status eval { Apache::TestRun-new(test_config =
Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestServer.pm
Doug MacEachern wrote: On Mon, 7 Jan 2002, Stas Bekman wrote: I needed it TestRun, whereas the fork was happening in TestServer. So it was definitely easier to do it locally. are you saying the following patch would not work? +1 better move it to the top, in case it needs to be used earlier. _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestServer.pm
[EMAIL PROTECTED] wrote: dougm 01/10/20 11:01:32 Modified:perl-framework/Apache-Test/lib/Apache TestServer.pm Log: make sure only 1 process is started for win32; else Kill will only shutdown the parent doesn't it contradict with being able to override maxclients? So if a certain test relies on the fact that it needs 2 servers at the same time, this will hang. At the end I didn't need 2 clients for ModPerl::Registry tests (so far) but it's possible that me or some other project using Apache::Test will need this functionality. I suggest to at least warn if maxclients =! 1 and WIN32 and we can solve it later. Or does it mean that the tests that require 1+ servers need to skip on WIN32? _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/