diff options
author | Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org> | 2024-05-04 17:24:57 +0200 |
---|---|---|
committer | Étienne Mollier <emollier@debian.org> | 2024-05-04 17:24:57 +0200 |
commit | 98d36c0826f55f81ff1f08739ec393cf32066ae4 (patch) | |
tree | b1cdcc6dbd5961ae7f65d7f81907287aef3b29f5 | |
parent | 80af189b1dc03e2101eb01ab88aaec4753b7dbf1 (diff) |
fix build failure when no network interfaces are available.
On buildd systems using sbuild chroot mode unshare, the network interface
leading to Internet is not exposed. However the default construction method
for instantiating Net::Frame::Devices relies on the existence of a network
interface able to route to 1.1.1.1. This change adjusts the test suite items
failing when not such interfaces are available, by trying to refer to loopback
interfaces instead. Note this slightly changes the meaning of the
t/04-new-default.t, as it does not test the default behavior anymore, but it
tests the behavior with ipv6 targets instead.
This addresses a Debian infrastructure specific behavior, probably not much
worth forwarding upstream.
Author: Étienne Mollier <emollier@debian.org>
Bug-Debian: https://bugs.debian.org/1070334
Forwarded: not-needed
Last-Update: 2024-05-04
Gbp-Pq: Name loopback-test.patch
-rw-r--r-- | t/04-new-default.t | 2 | ||||
-rw-r--r-- | t/05-new-target.t | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/t/04-new-default.t b/t/04-new-default.t index 3b0b95f..76819d2 100644 --- a/t/04-new-default.t +++ b/t/04-new-default.t @@ -2,7 +2,7 @@ use Test; BEGIN { plan(tests => 1) } use Net::Frame::Device; -my $d = Net::Frame::Device->new or die("Device::new"); +my $d = Net::Frame::Device->new(target6 => '::1') or die("Device::new"); print $d->cgDumper if $d->can('cgDumper'); ok(1); diff --git a/t/05-new-target.t b/t/05-new-target.t index 8f8ea3b..b7d3c69 100644 --- a/t/05-new-target.t +++ b/t/05-new-target.t @@ -2,7 +2,7 @@ use Test; BEGIN { plan(tests => 1) } use Net::Frame::Device; -my $d = Net::Frame::Device->new(target => '2.2.2.2') or die("Device::new"); +my $d = Net::Frame::Device->new(target => '127.1.1.1') or die("Device::new"); print $d->cgDumper if $d->can('cgDumper'); ok(1); |