The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6290
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === To ensure no regression of #6272 and #6270 Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
From a05563b8ad929137ccdc046573520e804352faaf Mon Sep 17 00:00:00 2001 From: Thomas Parrott <thomas.parr...@canonical.com> Date: Tue, 8 Oct 2019 08:51:00 +0100 Subject: [PATCH] test: Adds host-side MTU veth checks To ensure no regression of #6272 and #6270 Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com> --- test/suites/container_devices_nic_bridged.sh | 24 +++++++++++++++++--- test/suites/container_devices_nic_p2p.sh | 24 +++++++++++++++++--- 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/test/suites/container_devices_nic_bridged.sh b/test/suites/container_devices_nic_bridged.sh index 63724a50b8..0363dca052 100644 --- a/test/suites/container_devices_nic_bridged.sh +++ b/test/suites/container_devices_nic_bridged.sh @@ -63,7 +63,13 @@ test_container_devices_nic_bridged() { # Check profile custom MTU is applied in container on boot. if ! lxc exec "${ctName}" -- grep "1400" /sys/class/net/eth0/mtu ; then - echo "mtu invalid" + echo "container veth mtu invalid" + false + fi + + # Check profile custom MTU is applied on host side of veth. + if ! grep "1400" /sys/class/net/"${vethHostName}"/mtu ; then + echo "host veth mtu invalid" false fi @@ -126,7 +132,13 @@ test_container_devices_nic_bridged() { # Check custom MTU is applied on hot-plug. if ! lxc exec "${ctName}" -- grep "1401" /sys/class/net/eth0/mtu ; then - echo "mtu invalid" + echo "container veth mtu invalid" + false + fi + + # Check custom MTU is applied host-side on hot-plug. + if ! grep "1401" /sys/class/net/"${vethHostName}"/mtu ; then + echo "host veth mtu invalid" false fi @@ -171,7 +183,13 @@ test_container_devices_nic_bridged() { # Check profile custom MTU is applied on hot-removal. if ! lxc exec "${ctName}" -- grep "1400" /sys/class/net/eth0/mtu ; then - echo "mtu invalid" + echo "container veth mtu invalid" + false + fi + + # Checl profile custom MTU is applied host-side on hot-removal. + if ! grep "1400" /sys/class/net/"${vethHostName}"/mtu ; then + echo "host veth mtu invalid" false fi diff --git a/test/suites/container_devices_nic_p2p.sh b/test/suites/container_devices_nic_p2p.sh index 81bb370a39..04f322c7ee 100644 --- a/test/suites/container_devices_nic_p2p.sh +++ b/test/suites/container_devices_nic_p2p.sh @@ -44,7 +44,13 @@ test_container_devices_nic_p2p() { # Check profile custom MTU is applied in container on boot. if ! lxc exec "${ctName}" -- grep "1400" /sys/class/net/eth0/mtu ; then - echo "mtu invalid" + echo "container veth mtu invalid" + false + fi + + # Check profile custom MTU is applied on host-side on boot. + if ! grep "1400" /sys/class/net/"${vethHostName}"/mtu ; then + echo "host veth mtu invalid" false fi @@ -100,7 +106,13 @@ test_container_devices_nic_p2p() { # Check custom MTU is applied on hot-plug. if ! lxc exec "${ctName}" -- grep "1401" /sys/class/net/eth0/mtu ; then - echo "mtu invalid" + echo "container veth mtu invalid" + false + fi + + # Check custom MTU is applied on host-side on hot-plug. + if ! grep "1401" /sys/class/net/"${vethHostName}p2p"/mtu ; then + echo "host veth mtu invalid" false fi @@ -135,7 +147,13 @@ test_container_devices_nic_p2p() { # Check profile custom MTU is applied on hot-removal. if ! lxc exec "${ctName}" -- grep "1400" /sys/class/net/eth0/mtu ; then - echo "mtu invalid" + echo "container veth mtu invalid" + false + fi + + # Check profile custom MTU is applied on host-side on hot-removal. + if ! grep "1400" /sys/class/net/"${vethHostName}"/mtu ; then + echo "host veth mtu invalid" false fi
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel