[libapache2-mod-perl2] 01/04: Pick upstream test suite fixes for Perl 5.22 compatibility

Niko Tyni ntyni at moszumanska.debian.org
Mon Nov 30 16:22:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

ntyni pushed a commit to branch master
in repository libapache2-mod-perl2.

commit 40cbe95c243d312fce5d91c263b81a897ddcbec1
Author: Niko Tyni <ntyni at debian.org>
Date:   Mon Nov 30 17:58:03 2015 +0200

    Pick upstream test suite fixes for Perl 5.22 compatibility
    
    These are necessary but not sufficient for Perl 5.22.
---
 ...ri.t-t-apr-uri.t-and-t-apr-ext-uri.t-unde.patch | 43 ++++++++++++++++++++++
 ...rl-print.t-t-modperl-printf.t-and-t-direc.patch | 35 ++++++++++++++++++
 debian/patches/series                              |  2 +
 3 files changed, 80 insertions(+)

diff --git a/debian/patches/0001-Fix-t-api-uri.t-t-apr-uri.t-and-t-apr-ext-uri.t-unde.patch b/debian/patches/0001-Fix-t-api-uri.t-t-apr-uri.t-and-t-apr-ext-uri.t-unde.patch
new file mode 100644
index 0000000..7bc696d
--- /dev/null
+++ b/debian/patches/0001-Fix-t-api-uri.t-t-apr-uri.t-and-t-apr-ext-uri.t-unde.patch
@@ -0,0 +1,43 @@
+From d5eb71f8b1ea0b491fb80c62da54f5386a675a68 Mon Sep 17 00:00:00 2001
+From: Steve Hay <stevehay at apache.org>
+Date: Thu, 10 Sep 2015 08:58:55 +0000
+Subject: [PATCH 1/2] Fix t/api/uri.t, t/apr/uri.t and t/apr-ext/uri.t under
+ perl-5.22.0
+
+I'm working on CPAN RT#101962: Support for perl-5.22.0. The new "Redundant argument in sprintf" warning has revealed a couple of problems in our test suite which causes these tests to fail.
+
+git-svn-id: https://svn.apache.org/repos/asf/perl/modperl/trunk@1702195 13f79535-47bb-0310-9956-ffa450edef68
+---
+ t/lib/TestAPRlib/uri.pm   | 2 +-
+ t/response/TestAPI/uri.pm | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/t/lib/TestAPRlib/uri.pm b/t/lib/TestAPRlib/uri.pm
+index a68ad77..8c01282 100644
+--- a/t/lib/TestAPRlib/uri.pm
++++ b/t/lib/TestAPRlib/uri.pm
+@@ -88,7 +88,7 @@ sub test {
+     # - if no flags are passed to unparse, APR::Const::URI_UNP_OMITPASSWORD
+     #   is passed by default -- it hides the password
+     my $url1 = sprintf "%s://%s\@%s%s",
+-        map { $url{$_}[1] } grep !/^(password|port)$/, @keys_urls;
++        map { $url{$_}[1] } qw(scheme user hostname path);
+     ok t_cmp($url_unparsed, $url1, "unparsed url");
+ 
+     # various unparse flags #
+diff --git a/t/response/TestAPI/uri.pm b/t/response/TestAPI/uri.pm
+index 89f22bc..87ff65d 100644
+--- a/t/response/TestAPI/uri.pm
++++ b/t/response/TestAPI/uri.pm
+@@ -105,7 +105,7 @@ sub handler {
+     }
+     {
+         # this time include args and a pool object
+-        my $curl = $r->construct_url(sprintf "%s?%s", $r->uri, $r->args,
++        my $curl = $r->construct_url(sprintf("%s?%s", $r->uri, $r->args),
+                                      $r->pool->new);
+         t_debug("construct_url: $curl");
+         t_debug("r->uri: ", $r->uri);
+-- 
+2.6.2
+
diff --git a/debian/patches/0002-Fix-t-modperl-print.t-t-modperl-printf.t-and-t-direc.patch b/debian/patches/0002-Fix-t-modperl-print.t-t-modperl-printf.t-and-t-direc.patch
new file mode 100644
index 0000000..08a254b
--- /dev/null
+++ b/debian/patches/0002-Fix-t-modperl-print.t-t-modperl-printf.t-and-t-direc.patch
@@ -0,0 +1,35 @@
+From 1a4fec3b514b9107a5a805372864dbc7d2086d67 Mon Sep 17 00:00:00 2001
+From: Steve Hay <stevehay at apache.org>
+Date: Fri, 11 Sep 2015 08:28:54 +0000
+Subject: [PATCH 2/2] Fix t/modperl/print.t, t/modperl/printf.t and
+ t/directive/perlloadmodule3.t under perl-5.22.0
+
+I'm working on CPAN RT#101962: Support for perl-5.22.0. The new "Redundant argument in subroutine entry" warning for printf-type functions has revealed a problem in our printf override which causes these tests to fail. In threaded builds we wrongly included the thread context in the count of arguments being passed to perl's sprintf implementation, which then warned that more arguments were being passed than the format string required. With warnings being fatalized in all test scripts thi [...]
+
+git-svn-id: https://svn.apache.org/repos/asf/perl/modperl/trunk@1702395 13f79535-47bb-0310-9956-ffa450edef68
+---
+ xs/Apache2/RequestIO/Apache2__RequestIO.h | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/xs/Apache2/RequestIO/Apache2__RequestIO.h b/xs/Apache2/RequestIO/Apache2__RequestIO.h
+index 6c80830..ca5cb74 100644
+--- a/xs/Apache2/RequestIO/Apache2__RequestIO.h
++++ b/xs/Apache2/RequestIO/Apache2__RequestIO.h
+@@ -111,6 +111,14 @@ apr_size_t mpxs_ap_rprintf(pTHX_ I32 items, SV **MARK, SV **SP)
+ 
+     rcfg = modperl_config_req_get(r);
+ 
++    /* Reduce items by 1 for threaded builds since it otherwise includes
++     * the thread context, which shouldn't be included in the count of
++     * arguments being given to the sprintf() call.
++     */
++#ifdef USE_ITHREADS
++    --items;
++#endif
++
+     /* XXX: we could have an rcfg->sprintf_buffer to reuse this SV
+      * across requests
+      */
+-- 
+2.6.2
+
diff --git a/debian/patches/series b/debian/patches/series
index 46e17a5..e998588 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,5 @@ avoid-db-linkage.patch
 260_fix_pipelined_response_deadlock.patch
 #330-mod_authz_core.patch
 360-conditional-linux-pid-module.patch
+0001-Fix-t-api-uri.t-t-apr-uri.t-and-t-apr-ext-uri.t-unde.patch
+0002-Fix-t-modperl-print.t-t-modperl-printf.t-and-t-direc.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libapache2-mod-perl2.git



More information about the Pkg-perl-cvs-commits mailing list