control: tags -1 + pending

Hi,

Tomasz Buchert <tom...@debian.org> writes:
> On 04/05/17 04:47, Adam Borowski wrote:
>> [...]
>
> I cannot reproduce these failures. I've built in my stretch sbuild
> around 15 times, and succedeed every time.
>
> I use:
> gbp buildpackage --git-builder='sbuild --source-only-changes -v -As 
> --build-dep-resolver=apt --dist=stretch -j4' "$@"

The issue is reproducible as soon as something starts listening on port
9002 (e.g. nc -l -p 9002).

I pushed a commit adding a patch which fixes the test by picking an
unused port. The mechanism is not atomic (i.e., the port is picked by
the test process, as opposed to the listening process itself and
communicated back to the test process), but it’s an improvement and
should fix the issue at hand.

gui, could you take care of preparing a new upload, and filing the
unblock request? Let me know if you don’t have time for it, and I can do
an NMU.

For your convenience, I have also attached the patch to this message.

-- 
Best regards,
Michael
>From 243bb3faa682afa8168664eaf5a4f72cfc21ee27 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <stapelb...@debian.org>
Date: Sat, 6 May 2017 15:15:44 +0200
Subject: [PATCH] Add fix-ftbfs-static-port.patch

Closes: #851877
---
 debian/patches/fix-ftbfs-static-port.patch | 35 ++++++++++++++++++++++++++++++
 debian/patches/series                      |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 debian/patches/fix-ftbfs-static-port.patch

diff --git a/debian/patches/fix-ftbfs-static-port.patch b/debian/patches/fix-ftbfs-static-port.patch
new file mode 100644
index 0000000..5d5a9f0
--- /dev/null
+++ b/debian/patches/fix-ftbfs-static-port.patch
@@ -0,0 +1,35 @@
+Index: sslh/t
+===================================================================
+--- sslh.orig/t
++++ sslh/t
+@@ -4,14 +4,24 @@
+ 
+ use strict;
+ use IO::Socket::INET6;
++use IO::Socket::INET;
+ use Test::More qw/no_plan/;
+ 
+-# We use ports 9000, 9001 and 9002 -- hope that won't clash
+-# with anything...
+-my $ssh_address = "::1:9000";
+-my $ssl_address = "::1:9001";
+-my $sslh_port = 9002;
+-my $no_listen = 9003;  # Port on which no-one listens
++sub get_unused_port {
++    my $sock = IO::Socket::INET->new(
++        Listen => 1,
++        LocalAddr => 'localhost',
++        ReuseAddr => 1,
++    );
++    my $port = $sock->sockport();
++    $sock->shutdown(2);
++    return $port;
++}
++
++my $ssh_address = "::1:" . get_unused_port();
++my $ssl_address = "::1:" . get_unused_port();
++my $sslh_port = get_unused_port();
++my $no_listen = get_unused_port();  # Port on which no-one listens
+ my $pidfile = "/tmp/sslh_test.pid";
+ 
+ # Which tests do we run
diff --git a/debian/patches/series b/debian/patches/series
index 677eb75..faf6fff 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ fixed_version.diff
 disable_valgrind_launch.diff
 ftbfs_localhost.diff
 transparent_mode_local.diff
+fix-ftbfs-static-port.patch
-- 
2.11.0

Reply via email to