perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Hay <steve....@uk.radan.com>
Subject Re: t/perl/ithreads.t revisited
Date Fri, 10 Dec 2004 16:30:46 GMT
Stas Bekman wrote:

>Steve Hay wrote:
>  
>
>>Surely which tests get run should depend on which tests exist (*.t 
>>files), rather than which t/response/*.pm files exist?
>>    
>>
>
>It's a feature. *.t is autogenerated if t/response/*/*.pm is found. So if 
>you want to create some module which is *not* a response handler, put it 
>in t/lib or lib instead.
>  
>
Ah.  I didn't realise that.

>>Attached is a new test skeleton.  I am able to reproduce the failure 
>>using the skeleton in the following way (the usual "perl Makefile.PL / 
>>make / make test" sequence won't work because of the hash_attack problem 
>>described above):
>>
>>1. Extract tarball
>>
>>2. Run "perl Makefile.PL -apxs C:\apache2\bin\apxs.bat" [or wherever 
>>your apxs is] to generate a t/TEST
>>
>>3. Run "perl t/TEST t/modules/reload.t t/perl/api.t t/perl/ithreads.t" 
>>to explicitly run the tests that actually exist ;)  This succeeds at 
>>this stage -- all tests OK.
>>
>>4. Edit t/conf/httpd.conf as follows:
>>
>>4a.  Change the lines that look something like this:
>>
>><IfModule mod_perl.c>
>>    PerlRequire C:\Temp\bug-reporting-skeleton-mp2\t\conf\modperl_startup.pl
>></IfModule>
>>
>>to something like this instead:
>>
>>PerlSwitches -IC:\Temp\bug-reporting-skeleton-mp2\t\response
>>PerlSwitches -IC:\Temp\bug-reporting-skeleton-mp2\t\lib
>>PerlModule Apache2
>>
>>4b.  Insert the line:
>>
>>PerlModule TestPerl::hash_attack
>>
>>just before the lines:
>>
>><Location /TestPerl__hash_attack>
>>    SetHandler modperl
>>    PerlResponseHandler TestPerl::hash_attack
>></Location>
>>
>>5. Run "perl t/TEST t/modules/reload.t t/perl/api.t t/perl/ithreads.t" 
>>again.  This time, the ithreads.t test crashes the server.
>>
>>    
>>
>
>Any chance you can make the failing tarball, which already includes all 
>the above?
>  
>
Do you mean a tarball which contains those instructions or a tarball of 
my skeleton tree in which those instructions have already been carried out?

I assume you mean the former, since latter wouldn't be very useful.  
Attached (hopefully) is a new tarball with a (simplified) 
HOW_TO_REPRODUCE file, and hash_attack.pm moved to t/lib/

>  
>
>>As before, the crash doesn't happen without that hash_attack line.
>>
>>I don't know why replacing modperl_startup.pl with PerlSwitches is 
>>necessary to reproduce the crash here.  (Clearly it wasn't necessary in 
>>the main mp2 test suite, or I'd never have found the crash to start 
>>with!)  My modperl_startup.pl contains just:
>>
>>BEGIN {
>>    use lib 'C:/Temp/bug-reporting-skeleton-mp2/t';
>>    for my $file (qw(modperl_inc.pl modperl_extra.pl)) {
>>        eval { require "conf/$file" } or
>>            die if grep { -e "$_/conf/$file" } @INC;
>>    }
>>}
>>
>>There is no modperl_extra.pl, and modperl_inc.pl only contains:
>>
>>use lib 'C:\Temp\bug-reporting-skeleton-mp2\t\response';
>>use lib 'C:\Temp\bug-reporting-skeleton-mp2\t\lib';
>>use Apache2;
>>
>>so I would have thought the change described above achieves nothing.  
>>What's the difference?
>>    
>>
>
>I think the only difference is that you don't add this path to @INC:
>
>   use lib 'C:/Temp/bug-reporting-skeleton-mp2/t';
>  
>
Oh yeah - I didn't see that!  Adding it to the list of PerlSwitches 
makes no difference, though.

- Steve


------------------------------------------------
Radan Computational Ltd.

We would like to take this opportunity to wish all our customers, suppliers and colleagues
seasons greetings.  We will not be sending corporate greetings cards this year.  Instead,
we will be making a donation to charity.

The information contained in this message and any files transmitted with it are confidential
and intended for the addressee(s) only.  If you have received this message in error or there
are any problems, please notify the sender immediately.  The unauthorized use, disclosure,
copying or alteration of this message is strictly forbidden.  Note that any views or opinions
presented in this email are solely those of the author and do not necessarily represent those
of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached
files for viruses: Radan Computational will accept no liability for any damage caused by any
virus transmitted by this email.
Mime
View raw message