You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Roderich Schupp <ro...@googlemail.com> on 2007/12/28 15:29:41 UTC

Test failures with perl 5.10

HI,

I'm trying to get mod_perl2 (2.0.3) working with perl 5.10.0.
I've applied patch 480902 from SVN to get it to compile,
but get failures in the test suite. Here's the output
with TEST_VERBOSE=1 for t/filter/both_str_con_add.t:

/usr/sbin/apache2  -d /var/tmp/build/libapache2-mod-perl2-2.0.3/t -f
/var/tmp/build/libapache2-mod-perl2-2.0.3/t/conf/httpd.conf -D APACHE2
-D PERL_USEITHREADS
using Apache/2.2.6 (prefork MPM)

waiting 120 seconds for server to start: .[Fri Dec 28 14:31:57 2007]
[warn] Useless use of AllowOverride in line 1381.
[Fri Dec 28 14:31:58 2007] [info] 6 Apache2:: modules loaded
[Fri Dec 28 14:31:58 2007] [info] 0 APR:: modules loaded
[Fri Dec 28 14:31:58 2007] [info] base server + 29 vhosts ready to run tests
waiting 120 seconds for server to start: ok (waited 7 secs)
server localhost:8529 started
server localhost:8530 listening (filter_out_apache)
server localhost:8531 listening (perlsections)
...
server localhost:8565 listening (TestHooks::push_handlers_anon)
t/filter/both_str_con_add......
1..4
# Running under perl version 5.010000 for linux
# Current time local: Fri Dec 28 14:32:05 2007
# Current time GMT:   Fri Dec 28 13:32:05 2007
# Using Test.pm version 1.25
# Using Apache/Test.pm version 1.29
ok 1
# expected: mod_perl
# received:
not ok 2
# Failed test 2 in t/filter/both_str_con_add.t at line 25
 Failed 3/4 subtests

Test Summary Report
-------------------
t/filter/both_str_con_add.t (Wstat: 13 Tests: 2 Failed: 1)
  Failed test number(s):  2
  Parse errors: Bad plan.  You planned 4 tests but ran 2.
Files=1, Tests=2,  2 wallclock secs ( 0.02 usr  0.01 sys +  0.77 cusr
0.12 csys =  0.92 CPU)
Result: FAIL
Failed 1/1 test programs. 1/2 subtests failed.


And t/logs/error_log has:

END in modperl_extra.pl, pid=2924
[Fri Dec 28 14:32:04 2007] [notice] Apache/2.2.6 (Debian) world
domination series/2.0 mod_perl/2.0.3 Perl/v5.10.0 configured --
resuming normal operations
[Fri Dec 28 14:32:04 2007] [info] Server built: Dec 18 2007 09:46:51
[Fri Dec 28 14:32:04 2007] [debug] prefork.c(1014): AcceptMutex:
sysvsem (default: sysvsem)
[Fri Dec 28 14:32:07 2007] [error] Can't add connection filter handler
'TestFilter::both_str_con_add::in_filter' since it doesn't have the
FilterConnectionHandler attribute set at
/var/tmp/build/libapache2-mod-perl2-2.0.3/t/filter/TestFilter/both_str_con_add.pm
line 25.\n
[Fri Dec 28 14:32:07 2007] [info] Child process pid=2933 is exiting
[Fri Dec 28 14:32:07 2007] [info] Child process pid=2933 is exiting -
server push
[Fri Dec 28 14:32:07 2007] [info] Child process pid=2934 is exiting
[Fri Dec 28 14:32:07 2007] [info] Child process pid=2934 is exiting -
server push
END in modperl_extra.pl, pid=2934

I put in some printfs and see that setting MP_CODE_ATTRS in
MPXS_modperl_filter_attributes
from the sub' Perl attributes works correctly. However, when MP_CODE_ATTRS is
checked in modperl_filter_runtime_add (that's where "Can't add
connection filter handler..."
above is issued from), handler->attrs has the value 0x8e1e240. This doesn't
look like an OR if any MP_FILTER_* flags at all, but rather like the
address of some
perl structure.

I guess the problem is that

#define MP_CODE_ATTRS(cv) (CvXSUBANY((CV*)cv).any_i32)

but in perl 5.10 we have

#define CvXSUBANY(sv)   ((XPVCV*)SvANY(sv))->xcv_start_u.xcv_xsubany
#define CvSTART(sv)     ((XPVCV*)SvANY(sv))->xcv_start_u.xcv_start

i.e.  CvXSUBANY and CvSTART share the same storage location
(probably under the assumption that the former is only relevant for XS subs
and the latter only for real perl subs).

Cheers, Roderich

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org