Your message dated Thu, 21 Apr 2016 16:52:25 +0000
with message-id <[email protected]>
and subject line Bug#814312: fixed in ifupdown 0.8.11
has caused the Debian Bug report #814312,
regarding add autopkgtest for hotplug interfaces
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
814312: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=814312
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ifupdown
Version: 0.8.10
Severity: wishlist
Tags: patch

Hello,

The attached git-formatted patch adds an autopkgtest to ifupdown to
provide integration testing for "allow-hotplug" interfaces. We used to
have that in systemd, but as all the logic and units are in ifupdown
now, it makes more sense to have the test there too. Feel free to
extend them for more scenarios, of course. :-)

I didn't commit myself, as I'm never sure when to add debian/changelog
or not. Do you use git-dch or something similar? (I'm not familiar
with that, I usually edit debian/changelog in the actual commits and
use debcommit -ae).

Thanks for considering,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
From d8cdea572797a571266d9815ab237e366d2e4e85 Mon Sep 17 00:00:00 2001
From: Martin Pitt <[email protected]>
Date: Wed, 10 Feb 2016 09:10:32 +0100
Subject: [PATCH] Add autopkgtest for "allow-hotplug" interfaces

Add an integration test to check that hotplugging an "allow-hotplug" interface
correctly brings this up. If running under systemd, check the [email protected]
instance as well.
---
 debian/tests/control |  5 +++++
 debian/tests/hotplug | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 debian/tests/control
 create mode 100755 debian/tests/hotplug

diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..7b3f584
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,5 @@
+Tests: hotplug
+Depends: ifupdown
+# requires udev, thus does not work in containers
+Restrictions: needs-root, isolation-machine
+
diff --git a/debian/tests/hotplug b/debian/tests/hotplug
new file mode 100755
index 0000000..93993fb
--- /dev/null
+++ b/debian/tests/hotplug
@@ -0,0 +1,60 @@
+#!/bin/sh
+# check behaviour of "allow-hotplug" interface
+set -e
+
+IFACE=sdtest42
+
+if [ -e /sys/class/net/$IFACE ]; then
+    echo "SKIP: network interface $IFACE already exists"
+    exit 0
+fi
+
+# different kinds of installs/images have different conventions; e. g.
+# cloud-init sources *.cfg, a Debian desktop sources only prefix-less files
+if grep -q 'source-directory .*interfaces.d' /etc/network/interfaces; then
+    IFACE_CFG=/etc/network/interfaces.d/${IFACE}
+elif grep -q 'source .*interfaces.d.*cfg' /etc/network/interfaces; then
+    IFACE_CFG=/etc/network/interfaces.d/${IFACE}.cfg
+else
+    echo "SKIP: /etc/network/interfaces does not include interfaces.d/"
+    exit 0
+fi
+
+cat <<EOF > $IFACE_CFG
+allow-hotplug $IFACE
+iface $IFACE inet static
+    address 192.168.234.129
+    netmask 255.255.255.0
+EOF
+
+# these should trigger uevents and [email protected]
+ip link add name $IFACE type veth peer name v$IFACE
+trap "ip link del dev $IFACE; rm $IFACE_CFG" EXIT INT QUIT PIPE
+
+sleep 3
+
+# $IFACE is configured in ifupdown, should succeed and be up
+ifquery --state $IFACE
+if [ -d /run/systemd/system ]; then
+    systemctl status -l ifup@${IFACE}.service
+fi
+
+OUT=$(ip a show dev $IFACE)
+if ! echo "$OUT" | grep -q 'inet 192.168.234.129/24'; then
+    echo "interface $IFACE not configured" >&2
+    echo "$OUT" >&2
+    exit 1
+fi
+
+# v$IFACE is not configured in ifupdown, should be down
+! ifquery --state v$IFACE
+if [ -d /run/systemd/system ]; then
+    ! systemctl status -l ifup@v${IFACE}.service
+fi
+
+OUT=$(ip a show dev v$IFACE)
+if echo "$OUT" | grep -q 'inet'; then
+    echo "interface $IFACE unexpectedly configured" >&2
+    echo "$OUT" >&2
+    exit 1
+fi
-- 
2.7.0

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Source: ifupdown
Source-Version: 0.8.11

We believe that the bug you reported is fixed in the latest version of
ifupdown, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guus Sliepen <[email protected]> (supplier of updated ifupdown package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 21 Apr 2016 18:22:20 +0200
Source: ifupdown
Binary: ifupdown
Architecture: source amd64
Version: 0.8.11
Distribution: unstable
Urgency: medium
Maintainer: Guus Sliepen <[email protected]>
Changed-By: Guus Sliepen <[email protected]>
Description:
 ifupdown   - high level tools to configure network interfaces
Closes: 814312 819287
Changes:
 ifupdown (0.8.11) unstable; urgency=medium
 .
   [ Wido den Hollander ]
   * Wait properly for Link-Local Address to go through DAD.
 .
   [ Imre Deak ]
   * Fix read_all_state when no state file exists. Closes: 819287
 .
   [ Arthur Gautier ]
   * Implement link naming (ip link set alias)
 .
   [ Martin Pitt <[email protected]> ]
   * Add autopkgtest for "allow-hotplug" interfaces. Closes: #814312
 .
   [ Guus Sliepen ]
   * Bump Standards-Version.
Checksums-Sha1:
 fa2cd04f10e44baba9dafaac7fd49df84ee6ce7e 1563 ifupdown_0.8.11.dsc
 39781555409162abc11727080540343f688473f2 70660 ifupdown_0.8.11.tar.xz
 b6afa991f80bdad8a0e66f4aa59cbbf4e5afbb0a 62030 ifupdown-dbgsym_0.8.11_amd64.deb
 d1e4435b9e626f868f56f6b2faac0388b561bc74 74146 ifupdown_0.8.11_amd64.deb
Checksums-Sha256:
 59866431e582f03bc4e084cda5a71938bf75ddd62a1548c22fa5f7c3d734fdc8 1563 
ifupdown_0.8.11.dsc
 031bde2faec65e1c962476eba19718f0918ca7e058882cd06e032e4f95e88e87 70660 
ifupdown_0.8.11.tar.xz
 517d61d112d4a847642fb2a4a1a69c36832198f7a3fbf4c84a8114512021f4ef 62030 
ifupdown-dbgsym_0.8.11_amd64.deb
 e89368b40d96d86c24a64aad0ee13a4f684817d6c2d087bc50fabf25096e0724 74146 
ifupdown_0.8.11_amd64.deb
Files:
 b861f42bbeec9c5c374b456ed024b363 1563 admin important ifupdown_0.8.11.dsc
 a21aa737a374c58ccde119bb9f9beac8 70660 admin important ifupdown_0.8.11.tar.xz
 29d972339fedb51d1b3ed359b6b29a94 62030 debug extra 
ifupdown-dbgsym_0.8.11_amd64.deb
 df9c61b760af2edb61629c85c6daee37 74146 admin important 
ifupdown_0.8.11_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJXGP7BAAoJED9JDeuHHvn6FJEP/R6o5dwRzoacA2HI87dE28j5
eTS9YctbtUnKTrSmZGTo7N9CtAgAAY8zKWNTVzRq69Ll45CyLyxqUUKsTXRlnsO5
G3HgW132yEu6qPj6b5jnyscJRoU/1KW49Z79q3r+lDuxsiQ6RqK3IaTqe/5/sMf2
zMYFhTLg+OtGjMwrPZ/E9iFI6uaTOhCE/Wzhd+eskyi1uJMgwI6YkgS3HG2ukqJV
bhp74Y4w2BvzsdBjE4/0Ke9Xbd66dcQOi/+CXADsqNMXAKND+HvSPL9rjZOB/5ur
Ueo8FAUxYZVVh/XKXjzRXKQ5MbTDLcPpbmZ/fixdcwRW30bk3ofJAVxKOCJjnnb/
YUtmlHa2ETdzzI3lbiec4X9xDnnabtbQt3F91IUb5mAsa0QfjDseiWfK598ZDjnn
ACvTTwlMNFbBFUf+pG/3AmCHRlmWFlB6NDKK3Cz/9X9Nus5IEnnMw7fV9DbWu9IM
VaTxnrO12KPBlgTwI4PfG1VWhDodjGPpBlmv5VE7BwxIG3nNapkoCpPKRPVfGbuF
dN4Q+UdDVfpIIcR8Ebtapq9SW/XIjOhDHfRlZ3SJUCWKAyRtRMjJ/DMMDU29FMGJ
OxAKmzBtbCZNK97qS4mqARRnJholYTQi8b3VJx65DUu/RliTHYicjWR9CmcBMSsP
2Jvo68jm+b/kYW34/U0m
=G72G
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to