Return-Path: Delivered-To: apmail-httpd-test-dev-archive@www.apache.org Received: (qmail 39311 invoked from network); 6 Jan 2005 17:57:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 6 Jan 2005 17:57:54 -0000 Received: (qmail 23522 invoked by uid 500); 6 Jan 2005 17:57:54 -0000 Delivered-To: apmail-httpd-test-dev-archive@httpd.apache.org Received: (qmail 23485 invoked by uid 500); 6 Jan 2005 17:57:54 -0000 Mailing-List: contact test-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: test-dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list test-dev@httpd.apache.org Received: (qmail 23471 invoked by uid 99); 6 Jan 2005 17:57:53 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mail.logilune.com (HELO mail.logilune.com) (195.80.154.36) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 06 Jan 2005 09:57:52 -0800 Received: from [127.0.0.1] (localhost.logilune.com [127.0.0.1]) by mail.logilune.com (Postfix) with ESMTP id E682E1E1D3A; Thu, 6 Jan 2005 18:57:48 +0100 (CET) Message-ID: <41DD7C1B.2050108@stason.org> Date: Thu, 06 Jan 2005 12:57:47 -0500 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041217 X-Accept-Language: en-us, en, he, ru MIME-Version: 1.0 To: Nick *** Cc: httpd-test-dev list Subject: [A-T patch] changing should_skip_module to support regex skip patterns References: <472579070.1105015887086.JavaMail.nobody@app4.ni.bg> In-Reply-To: <472579070.1105015887086.JavaMail.nobody@app4.ni.bg> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N As you can see from the email below, some modules embed a version number in the module 'mod_fastcgi-2.4.2-AP20.dll'. Our should_skip_module only matches an exact name. The patch at the end of this email extends the functionality to support regex skip arguments. Let me know if you have any objections to this change. The only bad things about this change is that it slows things a bit (now needs to iterate over all entries in skip list on each module, previously it was a single hash lookup). Nick, also please confirm that the patch below *does* work for you :) Thanks. Nick *** wrote: > >Nick *** wrote: > > > >>> Are you running the latest dev svn? > >> > >> The latest svn is fine. I just removed the patch in order to test more > >> this issue, and that's the coredump... > > > >Understood. I certainly don't have the time to look at fastcgi problems at > >the moment. If someone can that would be great. > > > >so we are all well on this setup. Great! > > Not quite well with RC3. > When executing this code in TestRun.pm > > # - don't inherit LoadModule perl_module from the apache httpd.conf > # - loaded fastcgi crashes some mp2 tests > my %skip = map { ("mod_$_.c" => 1) } qw(perl fastcgi); > sub should_skip_module { > my($self, $name) = @_; > print "\n\n$name\n\n"; > exists $skip{$name} ? 1 : $self->SUPER::should_skip_module($name); > } > > and checking for fastcgi, the value of $name is 'mod_fastcgi-2.4.2-AP20.dll' and not 'mod_fastcgi.c', so the module is loaded and the tests fail again. Please try this patch: Index: lib/ModPerl/TestRun.pm =================================================================== --- lib/ModPerl/TestRun.pm (revision 124346) +++ lib/ModPerl/TestRun.pm (working copy) @@ -64,12 +64,9 @@ # - don't inherit LoadModule perl_module from the apache httpd.conf # - loaded fastcgi crashes some mp2 tests -my %skip = map { ("mod_$_.c" => 1) } qw(perl fastcgi); -sub should_skip_module { - my($self, $name) = @_; +my @skip = ('mod_perl.c', qr/mod_fastcgi.*?\.c$/); - exists $skip{$name} ? 1 : $self->SUPER::should_skip_module($name); -} +Apache::TestConfig::autoconfig_skip_module_add(@skip); 1; Index: Apache-Test/lib/Apache/TestConfigParse.pm =================================================================== --- Apache-Test/lib/Apache/TestConfigParse.pm (revision 124346) +++ Apache-Test/lib/Apache/TestConfigParse.pm (working copy) @@ -162,20 +162,28 @@ #XXX mod_jk requires JkWorkerFile or JkWorker to be configured #skip it for now, tomcat has its own test suite anyhow. #XXX: mod_casp2.so requires other settings in addition to LoadModule -my %autoconfig_skip_module = map { $_, 1 } qw(mod_jk.c mod_casp2.c); +my @autoconfig_skip_module = qw(mod_jk.c mod_casp2.c); # add modules to be not inherited from the existing config. # e.g. prevent from LoadModule perl_module to be included twice, when # mod_perl already configures LoadModule and it's certainly found in # the existing httpd.conf installed system-wide. sub autoconfig_skip_module_add { - my($name) = @_; - $autoconfig_skip_module{$name} = 1; + push @autoconfig_skip_module, @_; } sub should_skip_module { my($self, $name) = @_; - return $autoconfig_skip_module{$name} ? 1 : 0; + + for (@autoconfig_skip_module) { + if (UNIVERSAL::isa($_, 'Regexp')) { + return 1 if $name =~ /$_/; + } + else { + return 1 if $name eq $_; + } + } + return 0; } #inherit LoadModule @@ -192,7 +200,8 @@ } my $name = basename $args->[1]; - $name =~ s/\.s[ol]$/.c/; #mod_info.so => mod_info.c + $name =~ s/\.(s[ol]|dll)$/.c/; #mod_info.so => mod_info.c + $name =~ s/\.dll$/.c/; #mod_info.so => mod_info.c $name =~ s/^lib/mod_/; #libphp4.so => mod_php4.c $name = $modname_alias{$name} if $modname_alias{$name}; -- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com