On Thu, 25 Sep 2003, Stas Bekman wrote:

> Stas Bekman wrote:

> If that short test fails, please also try again after
> commenting out the two subtests calling ancestry_count().
>
> > sub handler {
> >     my $r = shift;
> >
> >     plan $r, tests => 7;
> >     # test: destroying a sub-pool before the parent pool
> >     {
> >         my $pp = APR::Pool->new;
> >
> >         ok t_cmp(1, $pp->isa('APR::Pool'), "isa('APR::Pool')");
> >
> >         ok t_cmp(1, ancestry_count($pp),
> >                  "a new pool has one ancestor: the global pool");
>
> >         ok t_cmp(2, ancestry_count($sp),
> >                  "a subpool has 2 ancestors: the parent and global pools");
>
> And also please add debug printout into the cleanup callbacks:
>
> sub add_cleanup {
>      my $arg = shift;
>      debug "adding cleanup note";
>      $arg->[0]->notes->add(cleanup => $arg->[1]);
>      1;
> }
>
> sub set_cleanup {
>      my $arg = shift;
>      debug "setting cleanup note";
>      $arg->[0]->notes->set(cleanup => $arg->[1]);
>      1;
> }
>
> so that when running the server with -trace=debug these will print out when
> they are called.

Running these 5 tests (the 7 minus the two involving
ancestory_count):

\Apache2/bin/Apache.exe  -d C:/MyFiles/MODPER~1.0/t -f 
C:/MyFiles/MODPER~1.0/t/conf/httpd.conf -DAPACHE2 -DPERL_USEITHREADS
using Apache/2.0.47 (winnt MPM)

waiting for server to start: .
waiting for server to start: ok (waited 0 secs)
server localhost:8529 started
[ .. ]
apr/pool....1..5
# Running under perl version 5.008001 for MSWin32
# Current time local: Thu Sep 25 22:51:06 2003
# Current time GMT:   Fri Sep 26 03:51:06 2003
# Using Test.pm version 1.24
# testing : isa('APR::Pool')
# expected: 1
# received: 1
ok 1
# testing : isa('APR::Pool')
# expected: 1
# received: 1
ok 2
# testing : should be 2 notes
# expected: 2
# received: 2
ok 3
# expected: child
# received: child
ok 4
# expected: parent
# received: parent
ok 5
ok
All tests successful.
Files=1, Tests=5, 37 wallclock secs ( 0.00 cusr +  0.00 csys =  0.00 CPU)

I couldn't get the debug statements to work, so I had
the debug lines in add_cleanup and set_cleanup write
to the server error log instead:

[Thu Sep 25 22:51:04 2003] [info] mod_perl: using Perl HASH_SEED: 3100308465
[Thu Sep 25 22:51:10 2003] [info] 22 Apache:: modules loaded
[Thu Sep 25 22:51:10 2003] [info] 5 APR:: modules loaded
[Thu Sep 25 22:51:10 2003] [info] base server + 11 vhosts ready to run tests
[Thu Sep 25 22:51:24 2003] [info] mod_perl: using Perl HASH_SEED: 792137735
[ .. ]
[Thu Sep 25 22:51:34 2003] [warn] [client 127.0.0.1] setting cleanup note
[Thu Sep 25 22:51:34 2003] [warn] [client 127.0.0.1] adding cleanup note

-- 
best regards,
randy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to