perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hedges <Mark.Hed...@Ticketmaster.com>
Subject bug in test script t/api/err_headers_out.t in released mod_perl 2.0.8 - patch supplied
Date Mon, 23 Jun 2014 07:21:39 GMT
t/api/err_headers_out.t was recently changed to accommodate changes in HTTP::Headers 6.0, but
the change did not make it forward-compatible for further versions of HTTP::Headers.  The
patch for the test script is below at the end.  Thank you.  HTH.  -Mark

sre@tst1.ntf.cftdev1 /ntfhome/local/src/perl/mod_perl-2.0.8
2014-06-23 00:17:16 Mon  $ t/TEST -clean
                                               
sre@tst1.ntf.cftdev1 /ntfhome/local/src/perl/mod_perl-2.0.8
2014-06-23 00:17:25 Mon  $ t/TEST -verbose t/api/err_headers_out.t
/ntfhome/local/sbin/httpd  -d /ntfhome/local/src/perl/mod_perl-2.0.8/t -f /ntfhome/local/src/perl/mod_perl-2.0.8/t/conf/httpd.conf
-D APACHE2 -D PERL_USEITHREADS
using Apache/2.2.27 (prefork MPM)

waiting 120 seconds for server to start: .[Mon Jun 23 00:17:36 2014] [info] 6 Apache2:: modules
loaded
[Mon Jun 23 00:17:36 2014] [info] 0 APR:: modules loaded
[Mon Jun 23 00:17:36 2014] [info] base server + 29 vhosts ready to run tests
....
waiting 120 seconds for server to start: ok (waited 4 secs)
server localhost:8529 started
server localhost:8530 listening (filter_out_apache)
server localhost:8531 listening (perlsections)
server localhost:8532 listening (inherit)
server localhost:8533 listening (TestModperl::merge)
server localhost:8534 listening (TestModperl::perl_options)
server localhost:8535 listening (TestModperl::perl_options2)
server localhost:8536 listening (TestModperl::setupenv)
server localhost:8537 listening (TestModules::proxy)
server localhost:8538 listening (TestUser::rewrite)
server localhost:8539 listening (TestVhost::config)
server localhost:8540 listening (TestVhost::log)
server localhost:8541 listening (TestProtocol::echo_bbs)
server localhost:8542 listening (TestProtocol::echo_bbs2)
server localhost:8543 listening (TestProtocol::echo_block)
server localhost:8544 listening (TestProtocol::echo_filter)
server localhost:8545 listening (TestProtocol::echo_nonblock)
server localhost:8546 listening (TestProtocol::echo_timeout)
server localhost:8547 listening (TestProtocol::pseudo_http)
server localhost:8548 listening (TestPreConnection::note)
server localhost:8549 listening (TestHooks::hookrun)
server localhost:8550 listening (TestHooks::init)
server localhost:8551 listening (TestHooks::stacked_handlers2)
server localhost:8552 listening (TestHooks::startup)
server localhost:8553 listening (TestHooks::trans)
server localhost:8554 listening (TestFilter::both_str_con_add)
server localhost:8555 listening (TestFilter::in_bbs_inject_header)
server localhost:8556 listening (TestFilter::in_bbs_msg)
server localhost:8557 listening (TestFilter::in_str_msg)
server localhost:8558 listening (TestDirective::perlmodule)
server localhost:8559 listening (TestDirective::perlrequire)
server localhost:8560 listening (TestAPI::add_config)
server localhost:8561 listening (TestDirective::perlloadmodule3)
server localhost:8562 listening (TestDirective::perlloadmodule4)
server localhost:8563 listening (TestDirective::perlloadmodule5)
server localhost:8564 listening (TestDirective::perlloadmodule6)
server localhost:8565 listening (TestHooks::push_handlers_anon)
t/api/err_headers_out.t .. 
1..6
# Running under perl version 5.020000 for linux
# Current time local: Mon Jun 23 00:17:41 2014
# Current time GMT:   Mon Jun 23 07:17:41 2014
# Using Test.pm version 1.26
# Using Apache/Test.pm version 1.37
# HTTP/1.1 200 OK
# Connection: close
# Date: Mon, 23 Jun 2014 07:17:42 GMT
# Server: Apache/2.2.27 (Unix) world domination series/2.0 mod_perl/2.0.8 Perl/v5.20.0
# Content-Length: 0
# Content-Type: text/plain
# Client-Date: Mon, 23 Jun 2014 07:17:42 GMT
# Client-Peer: 127.0.0.1:8529
# Client-Response-Num: 1
# X-Err_headers_out: err_headers_out
# X-Headers_out: headers_out
# testing : OK
# expected: 200
# received: 200
ok 1
# testing : X-err_headers_out: made it
# expected: err_headers_out
# received: undef
not ok 2
# Failed test 2 in t/api/err_headers_out.t at line 30
# testing : X-headers_out: made it
# expected: headers_out
# received: undef
not ok 3
# Failed test 3 in t/api/err_headers_out.t at line 33
# HTTP/1.1 404 Not Found
# Connection: close
# Date: Mon, 23 Jun 2014 07:17:42 GMT
# Server: Apache/2.2.27 (Unix) world domination series/2.0 mod_perl/2.0.8 Perl/v5.20.0
# Content-Length: 353
# Content-Type: text/html; charset=iso-8859-1
# Client-Date: Mon, 23 Jun 2014 07:17:42 GMT
# Client-Peer: 127.0.0.1:8529
# Client-Response-Num: 1
# Title: 404 Not Found
# X-Err_headers_out: err_headers_out
# 
# <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
# <html><head>
# <title>404 Not Found</title>
# </head><body>
# <h1>Not Found</h1>
# <p>The requested URL /TestAPI__err_headers_out was not found on this server.</p>
# <hr>
# <address>Apache/2.2.27 (Unix) world domination series/2.0 mod_perl/2.0.8 Perl/v5.20.0
Server at localhost Port 8529</address>
# </body></html>
# testing : not found
# expected: 404
# received: 404
ok 4
# testing : X-err_headers_out: made it
# expected: err_headers_out
# received: undef
not ok 5
# Failed test 5 in t/api/err_headers_out.t at line 55
ok 6
Failed 3/6 subtests 

Test Summary Report
-------------------
t/api/err_headers_out.t (Wstat: 0 Tests: 6 Failed: 3)
  Failed tests:  2-3, 5
Files=1, Tests=6,  2 wallclock secs ( 0.05 usr  0.01 sys +  0.77 cusr  0.25 csys =  1.08 CPU)
Result: FAIL
Failed 1/1 test programs. 3/6 subtests failed.
[warning] server localhost:8529 shutdown
[warning] port 8529 still in use...
done
[  error] error running tests (please examine t/logs/error_log)
                                               
sre@tst1.ntf.cftdev1 /ntfhome/local/src/perl/mod_perl-2.0.8
2014-06-23 00:17:46 Mon  $ perl -pi -e 's/==/>=/g' t/api/err_headers_out.t
                                               
sre@tst1.ntf.cftdev1 /ntfhome/local/src/perl/mod_perl-2.0.8
2014-06-23 00:18:24 Mon  $ t/TEST -clean
                                               
sre@tst1.ntf.cftdev1 /ntfhome/local/src/perl/mod_perl-2.0.8
2014-06-23 00:18:34 Mon  $ t/TEST -verbose t/api/err_headers_out.t
/ntfhome/local/sbin/httpd  -d /ntfhome/local/src/perl/mod_perl-2.0.8/t -f /ntfhome/local/src/perl/mod_perl-2.0.8/t/conf/httpd.conf
-D APACHE2 -D PERL_USEITHREADS
using Apache/2.2.27 (prefork MPM)

waiting 120 seconds for server to start: .[Mon Jun 23 00:18:40 2014] [info] 6 Apache2:: modules
loaded
[Mon Jun 23 00:18:40 2014] [info] 0 APR:: modules loaded
[Mon Jun 23 00:18:40 2014] [info] base server + 29 vhosts ready to run tests
....
waiting 120 seconds for server to start: ok (waited 4 secs)
server localhost:8529 started
server localhost:8530 listening (filter_out_apache)
server localhost:8531 listening (perlsections)
server localhost:8532 listening (inherit)
server localhost:8533 listening (TestModperl::merge)
server localhost:8534 listening (TestModperl::perl_options)
server localhost:8535 listening (TestModperl::perl_options2)
server localhost:8536 listening (TestModperl::setupenv)
server localhost:8537 listening (TestModules::proxy)
server localhost:8538 listening (TestUser::rewrite)
server localhost:8539 listening (TestVhost::config)
server localhost:8540 listening (TestVhost::log)
server localhost:8541 listening (TestProtocol::echo_bbs)
server localhost:8542 listening (TestProtocol::echo_bbs2)
server localhost:8543 listening (TestProtocol::echo_block)
server localhost:8544 listening (TestProtocol::echo_filter)
server localhost:8545 listening (TestProtocol::echo_nonblock)
server localhost:8546 listening (TestProtocol::echo_timeout)
server localhost:8547 listening (TestProtocol::pseudo_http)
server localhost:8548 listening (TestPreConnection::note)
server localhost:8549 listening (TestHooks::hookrun)
server localhost:8550 listening (TestHooks::init)
server localhost:8551 listening (TestHooks::stacked_handlers2)
server localhost:8552 listening (TestHooks::startup)
server localhost:8553 listening (TestHooks::trans)
server localhost:8554 listening (TestFilter::both_str_con_add)
server localhost:8555 listening (TestFilter::in_bbs_inject_header)
server localhost:8556 listening (TestFilter::in_bbs_msg)
server localhost:8557 listening (TestFilter::in_str_msg)
server localhost:8558 listening (TestDirective::perlmodule)
server localhost:8559 listening (TestDirective::perlrequire)
server localhost:8560 listening (TestAPI::add_config)
server localhost:8561 listening (TestDirective::perlloadmodule3)
server localhost:8562 listening (TestDirective::perlloadmodule4)
server localhost:8563 listening (TestDirective::perlloadmodule5)
server localhost:8564 listening (TestDirective::perlloadmodule6)
server localhost:8565 listening (TestHooks::push_handlers_anon)
t/api/err_headers_out.t .. 
1..6
# Running under perl version 5.020000 for linux
# Current time local: Mon Jun 23 00:18:45 2014
# Current time GMT:   Mon Jun 23 07:18:45 2014
# Using Test.pm version 1.26
# Using Apache/Test.pm version 1.37
# HTTP/1.1 200 OK
# Connection: close
# Date: Mon, 23 Jun 2014 07:18:46 GMT
# Server: Apache/2.2.27 (Unix) world domination series/2.0 mod_perl/2.0.8 Perl/v5.20.0
# Content-Length: 0
# Content-Type: text/plain
# Client-Date: Mon, 23 Jun 2014 07:18:46 GMT
# Client-Peer: 127.0.0.1:8529
# Client-Response-Num: 1
# X-Err_headers_out: err_headers_out
# X-Headers_out: headers_out
# testing : OK
# expected: 200
# received: 200
ok 1
# testing : X-err_headers_out: made it
# expected: err_headers_out
# received: err_headers_out
ok 2
# testing : X-headers_out: made it
# expected: headers_out
# received: headers_out
ok 3
# HTTP/1.1 404 Not Found
# Connection: close
# Date: Mon, 23 Jun 2014 07:18:46 GMT
# Server: Apache/2.2.27 (Unix) world domination series/2.0 mod_perl/2.0.8 Perl/v5.20.0
# Content-Length: 353
# Content-Type: text/html; charset=iso-8859-1
# Client-Date: Mon, 23 Jun 2014 07:18:46 GMT
# Client-Peer: 127.0.0.1:8529
# Client-Response-Num: 1
# Title: 404 Not Found
# X-Err_headers_out: err_headers_out
# 
# <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
# <html><head>
# <title>404 Not Found</title>
# </head><body>
# <h1>Not Found</h1>
# <p>The requested URL /TestAPI__err_headers_out was not found on this server.</p>
# <hr>
# <address>Apache/2.2.27 (Unix) world domination series/2.0 mod_perl/2.0.8 Perl/v5.20.0
Server at localhost Port 8529</address>
# </body></html>
# testing : not found
# expected: 404
# received: 404
ok 4
# testing : X-err_headers_out: made it
# expected: err_headers_out
# received: err_headers_out
ok 5
ok 6
ok
All tests successful.
Files=1, Tests=6,  2 wallclock secs ( 0.04 usr  0.02 sys +  0.79 cusr  0.27 csys =  1.12 CPU)
Result: PASS
[warning] server localhost:8529 shutdown
[warning] port 8529 still in use...
done
                                               
sre@tst1.ntf.cftdev1 /ntfhome/local/src/perl/mod_perl-2.0.8
2014-06-23 00:18:50 Mon  $ diff -u t/api/err_headers_out.t.orig t/api/err_headers_out.t
--- t/api/err_headers_out.t.orig	2014-06-22 23:27:54.668353000 -0700
+++ t/api/err_headers_out.t	2014-06-23 00:18:24.267013000 -0700
@@ -25,7 +25,7 @@
     local $HTTP::Headers::TRANSLATE_UNDERSCORE=
 	$HTTP::Headers::TRANSLATE_UNDERSCORE;
     undef $HTTP::Headers::TRANSLATE_UNDERSCORE
-	if defined HTTP::Headers->VERSION and HTTP::Headers->VERSION==6.00;
+	if defined HTTP::Headers->VERSION and HTTP::Headers->VERSION>=6.00;
 
     ok t_cmp $res->header('X-err_headers_out'), "err_headers_out",
         "X-err_headers_out: made it";
@@ -50,7 +50,7 @@
     local $HTTP::Headers::TRANSLATE_UNDERSCORE=
 	$HTTP::Headers::TRANSLATE_UNDERSCORE;
     undef $HTTP::Headers::TRANSLATE_UNDERSCORE
-	if defined HTTP::Headers->VERSION and HTTP::Headers->VERSION==6.00;
+	if defined HTTP::Headers->VERSION and HTTP::Headers->VERSION>=6.00;
 
     ok t_cmp $res->header('X-err_headers_out'), "err_headers_out",
         "X-err_headers_out: made it";

Mime
View raw message