httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: Perl test framework, TestConfig, and debugging A::T
Date Fri, 16 Jan 2004 01:08:39 GMT
Stas Bekman wrote:
> Stas Bekman wrote:
> 
>> William McKee wrote:
>>
>>> On Wed, Jan 14, 2004 at 08:41:01PM -0800, Stas Bekman wrote:
>>>
>>>> Cool, now I get the thing running.
>>>
>>>
>>>
>>>
>>> Great. Are you getting any failures? Please read my notes in
>>> testnotes.txt.
>>
>>
>>
>> Yes. I will look at the failures soonish.
> 
> 
> I don't have apache 1.3 with ssl so I can't test it. And it doesn't 
> quite work with apache/mp 2.0 because you have hardcoded mp1 API. Please 
> see the porting doc: 
> http://perl.apache.org/docs/2.0/user/porting/porting.html
> http://perl.apache.org/docs/2.0/user/porting/porting.html#Making_Code_Conditional_on_Running_mod_perl_Version

> 
> 
> For example you have a problem with constants, so under mp2 I get:
> /home/stas/httpd/prefork/bin/httpd: relocation error: 
> /home/stas/perl/5.8.3-ithread/lib/site_perl/5.8.3/i686-linux-thread-multi/auto/Apache/Constants/Constants.so:

> undefined symbol: perl_require_module
> and it shouldn't use that module.
> 
> 
> Also you may want to adopt the convention we use for other test suites, 
> where the response part of the test resides under t/response. So you 
> usually don't test the module as is, but you create a response handler 
> that tests it. But it doesn't have to be that way of course.
> 
> Now to your issues:
> 
>  >  - APACHE_TEST_LIVE_DEV=1 environment
>  > I have written a test in 02_livedev.t which tests this setting and
>  > checks that the first directory in @INC does not contain 'blib'. This
>  > probably isn't a safe test for distribution due to the possibility of
>  > blib being in someone's path. However, I think it is sufficient for
>  > debugging purposes. This test fails on my system.
> 
> this is because you are testing in the "wrong" place. 
> APACHE_TEST_LIVE_DEV affects the server, not the client. It adds 'lib' 
> in modperl_inc.pl which affects the server. You need to write a response 
> part of the test like we do in all other test suites and test it there.
> 
> I guess we could make the autogenerated t/TEST include that as well, the 
> problem is that if you include any other libs, they will come before it 
> in @INC.
> 
>  >  - Using two servers (one plain and one SSL)
>  >
>  >     1. Getting hostport doesn't work when starting server for
>  >        repetitive tests. Tests 3-5 will fail using the following
>  >        sequence of commands:
>  >     t/TEST -start
>  >     t/TEST -run-tests t/03_hostport.t
>  >
>  >     2. Once hostport is obtained for the second server, calls to
>  >        '/page.html'
>  > fail. I may simply be abusing the system in my ignorance. Test #5 in
>  > 03_hostport.t fails for me whether you start the server first as above
>  > or just run make test.
> 
> this test fails long before it gets to 3:
> 
> Use of uninitialized value in concatenation (.) or string at 
> 03_hostport.t line 32.
> 
> hostport is not there. That looks like some sort of config bug. I'll 
> look into it.

strange, I saw it once and could never reproduce it again. What is the 
sequence of commands when you get it?

  t/TEST -start
  t/TEST -run-tests t/03_hostport.t

can't work alone, you need to tell the httpd or apxs location somewhere. 
When/where do you do that?

I get:

ok 2
# $VAR1 = {
#           'securehost' => {
#                             'servername' => 'localhost.localdomain',
#                             'hostport' => 'localhost.localdomain:8530',
#                             'name' => 'localhost.localdomain:8530',
#                             'port' => 8530,
#                             'namebased' => 0
#                           }
#         };
# testing: hostport = localhost.localdomain:8530
# testing : Retrieving hostport - localhost.localdomain:8530.
# expected: 1
# received: 1

which seems to be fine.

ok 3
# testing : Retrieve index page from SSL server
# expected: (?-xism:SSL)
# received: LWP will support https URLs if the Crypt::SSLeay module is installed.

that also means that you need to tests for LWP and Crypt::SSLeay before you 
run this subtest or you should skip it. otherwise this sub-test doesn't do 
anything.

Also I don't understand how you try to support mp2 if you don't load Apache2.

__________________________________________________________________
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


Mime
View raw message