[lxc-devel] [lxd/master] test: Updates udhcpd args to ensure process quits one lease acquired
tomponline on Github
lxc-bot at linuxcontainers.org
Fri Jun 19 15:25:26 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 361 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200619/690e9919/attachment.bin>
-------------- next part --------------
From 07e821ca97078e173efe69bf4af732b30729b232 Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parrott at canonical.com>
Date: Fri, 19 Jun 2020 16:24:22 +0100
Subject: [PATCH] test: Updates udhcpd args to ensure process quits one lease
acquired
Signed-off-by: Thomas Parrott <thomas.parrott at canonical.com>
---
test/suites/container_devices_nic_bridged.sh | 6 +++---
test/suites/container_devices_nic_bridged_filtering.sh | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/test/suites/container_devices_nic_bridged.sh b/test/suites/container_devices_nic_bridged.sh
index c275a89785..a1f52d19b3 100644
--- a/test/suites/container_devices_nic_bridged.sh
+++ b/test/suites/container_devices_nic_bridged.sh
@@ -325,7 +325,7 @@ test_container_devices_nic_bridged() {
lxc launch testimage "${ctName}" -p "${ctName}"
# Request DHCPv4 lease with custom name (to check managed name is allocated instead).
- lxc exec "${ctName}" -- udhcpc -i eth0 -F "${ctName}custom"
+ lxc exec "${ctName}" -- udhcpc -i eth0 -n -q -F "${ctName}custom"
# Check DHCPv4 lease is allocated.
if ! grep -i "${ctMAC}" "${LXD_DIR}/networks/${brName}/dnsmasq.leases" ; then
@@ -346,7 +346,7 @@ test_container_devices_nic_bridged() {
fi
if [ "$busyboxUdhcpc6" = "1" ]; then
- lxc exec "${ctName}" -- udhcpc6 -i eth0
+ lxc exec "${ctName}" -- udhcpc6 -i eth0 -n -q
fi
# Delete container, check LXD releases lease.
@@ -404,7 +404,7 @@ test_container_devices_nic_bridged() {
# Check dnsmasq leases file removed if DHCP disabled and that device can be removed.
lxc config device add "${ctName}" eth0 nic nictype=bridged parent="${brName}" name=eth0
lxc start "${ctName}"
- lxc exec "${ctName}" -- udhcpc -i eth0
+ lxc exec "${ctName}" -- udhcpc -i eth0 -n -q
lxc network unset "${brName}" ipv4.address
lxc network unset "${brName}" ipv6.address
diff --git a/test/suites/container_devices_nic_bridged_filtering.sh b/test/suites/container_devices_nic_bridged_filtering.sh
index 3828f9ec61..5d12e9ef33 100644
--- a/test/suites/container_devices_nic_bridged_filtering.sh
+++ b/test/suites/container_devices_nic_bridged_filtering.sh
@@ -172,7 +172,7 @@ test_container_devices_nic_bridged_filtering() {
# Check DHCPv4 allocation still works.
lxc exec "${ctPrefix}A" -- ip link set dev eth0 address "${ctAMAC}" up
- lxc exec "${ctPrefix}A" -- udhcpc -i eth0 -n
+ lxc exec "${ctPrefix}A" -- udhcpc -i eth0 -n -q
lxc exec "${ctPrefix}A" -- ip a flush dev eth0
lxc exec "${ctPrefix}A" -- ip a add 192.0.2.2/24 dev eth0
@@ -348,7 +348,7 @@ test_container_devices_nic_bridged_filtering() {
fi
if [ "$busyboxUdhcpc6" = "1" ]; then
- lxc exec "${ctPrefix}A" -- udhcpc6 -i eth0 -n
+ lxc exec "${ctPrefix}A" -- udhcpc6 -i eth0 -n -q
fi
lxc exec "${ctPrefix}A" -- ip -6 a flush dev eth0
More information about the lxc-devel
mailing list