Control: tag -1 + patch

On Sun, 17 Mar 2019 20:23:45 +0100, Lucas Nussbaum wrote:

> During a rebuild of all packages in buster (in a buster chroot, not a
> sid chroot), your package failed to build on amd64.

> > Test Summary Report
> > -------------------
> > t/100_low/08_proxy.t                          (Wstat: 28416 Tests: 0 
> > Failed: 0)
> >   Non-zero exit status: 111
> >   Parse errors: Bad plan.  You planned 84 tests but ran 0.
> > t/100_low/18_no_proxy.t                       (Wstat: 28416 Tests: 4 
> > Failed: 0)
> >   Non-zero exit status: 111
> >   Parse errors: Bad plan.  You planned 25 tests but ran 4.
> > t/100_low/32_proxy_auth.t                     (Wstat: 28416 Tests: 0 
> > Failed: 0)
> >   Non-zero exit status: 111
> >   Parse errors: Bad plan.  You planned 42 tests but ran 0.
> > Files=52, Tests=867, 108 wallclock secs ( 0.18 usr  0.05 sys +  5.03 cusr  
> > 0.78 csys =  6.04 CPU)
> > Result: FAIL
> > make: *** [/usr/share/cdbs/1/class/perl-build.mk:84: 
> > debian/stamp-perl-check] Error 1

I can reproduce the failure on 2 machines, with and without ipv6,
whith and without http_proxy set.

My suspicion currently is, and
https://ci.debian.net/packages/libf/libfurl-perl/testing/amd64/ seems
to confirm it, that the failure is caused by the change in
libhttp-daemon-perl 6.01-{2,3} which enabled ipv6 support, and has
to do with localhost vs. 127.0.0.1 (we have seen this in another
reverse dependency on libhttp-daemon-perl which was caught early by
autopkgtests).

What I don't understand is why exactly those 3 tests fail but I note
that they all match *proxy*.t _and_ use 127.0.0.1 (which other tests
do as well).

What I also don't understand is why the build succeeds on the
reproducible build hosts, with libhttp-daemon-perl 6.01-2 and -3:
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/libfurl-perl.html
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/i386/libfurl-perl.html
(and, at least for i386, the newer libhttp-proxy-perl 0.304-4)

JFTR: s/127\.0\.0\.1/localhost/g on the three test files doesn't
help, I still get e.g.

# prove --blib --verbose t/100_low/08_proxy.t
t/100_low/08_proxy.t .. 
1..84
cannot open port: 127.0.0.1:36653 at /usr/share/perl5/Test/TCP.pm line 53.
[Test::TCP] Child process does not block(PID: 6058, PPID: 6048) at 
/usr/share/perl5/Test/TCP.pm line 103.
# PROXY: Selected engine HTTP::Proxy::Engine::Legacy
# STATUS: Processed 0 connection(s)
# Looks like your test exited with 111 before it could output anything.
Dubious, test returned 111 (wstat 28416, 0x6f00)
Failed 84/84 subtests 

Additionally using localhost as well in t/HTTPServer.pm doesn't help
either. I wonder if maybe Test::TCP is involved as well? It seems to
default to 127.0.0.1 "unless defined $host". Or is it HTTP::Proxy
which defaults to "localhost"?

</monologue>

Fixing the HTTP::Proxy calls seems to do it:

-        my $proxy = Test::HTTP::Proxy->new(port => $proxy_port, via => $via);
+        my $proxy = Test::HTTP::Proxy->new(host => '127.0.0.1', port => 
$proxy_port, via => $via);

Complete patch attached, reviews more than welcome!


Cheers,
gregor





-- 
 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
   `-   NP: Beatles: Yesterday
--- a/t/100_low/08_proxy.t
+++ b/t/100_low/08_proxy.t
@@ -120,7 +120,7 @@
     },
     server => sub { # proxy server
         my $proxy_port = shift;
-        my $proxy = Test::HTTP::Proxy->new(port => $proxy_port, via => $via);
+        my $proxy = Test::HTTP::Proxy->new(host => '127.0.0.1', port => $proxy_port, via => $via);
         $proxy->agent(test_agent);
         $proxy->start();
     },
@@ -140,7 +140,7 @@
     },
     server => sub { # proxy server
         my $proxy_port = shift;
-        my $proxy = Test::HTTP::Proxy->new(port => $proxy_port, via => $via);
+        my $proxy = Test::HTTP::Proxy->new(host => '127.0.0.1', port => $proxy_port, via => $via);
         $proxy->agent(test_agent);
         $proxy->agent->real_httpd_port($httpd->port);
         $proxy->start();
@@ -183,7 +183,7 @@
     },
     server => sub { # proxy server
         my $proxy_port = shift;
-        my $proxy = Test::HTTP::Proxy->new(port => $proxy_port, via => $via);
+        my $proxy = Test::HTTP::Proxy->new(host => '127.0.0.1', port => $proxy_port, via => $via);
         $proxy->start();
     },
 );
--- a/t/100_low/18_no_proxy.t
+++ b/t/100_low/18_no_proxy.t
@@ -70,7 +70,7 @@
     },
     server => sub { # proxy server
         my $proxy_port = shift;
-        my $proxy = Test::HTTP::Proxy->new(port => $proxy_port, via => $via);
+        my $proxy = Test::HTTP::Proxy->new(host => '127.0.0.1', port => $proxy_port, via => $via);
         $proxy->start();
     },
 );
--- a/t/100_low/32_proxy_auth.t
+++ b/t/100_low/32_proxy_auth.t
@@ -79,7 +79,7 @@
     },
     server => sub { # proxy server
         my $proxy_port = shift;
-        my $proxy = Test::HTTP::Proxy->new(port => $proxy_port, via => $via);
+        my $proxy = Test::HTTP::Proxy->new(host => '127.0.0.1', port => $proxy_port, via => $via);
         my $token_simple = "Basic " . encode_base64( "dankogai:kogaidan", "" );
         my $token_escape = "Basic " . encode_base64( 'dan@kogai:kogai/dan', "" );
         $proxy->push_filter(

Attachment: signature.asc
Description: Digital Signature

Reply via email to