]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
selftests: test_vxlan_under_vrf: mute unnecessary error message
authorPo-Hsu Lin <po-hsu.lin@canonical.com>
Wed, 16 Dec 2020 04:22:03 +0000 (12:22 +0800)
committerAndrea Righi <andrea.righi@canonical.com>
Fri, 18 Dec 2020 07:20:00 +0000 (08:20 +0100)
BugLink: https://bugs.launchpad.net/bugs/1908342
The cleanup function in this script that tries to delete hv-1 / hv-2
vm-1 / vm-2 netns will generate some uncessary error messages:

Cannot remove namespace file "/run/netns/hv-2": No such file or directory
Cannot remove namespace file "/run/netns/vm-1": No such file or directory
Cannot remove namespace file "/run/netns/vm-2": No such file or directory

Redirect it to /dev/null like other commands in the cleanup function
to reduce confusion.

Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Link: https://lore.kernel.org/r/20201211042420.16411-1-po-hsu.lin@canonical.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 0e12c0271887f1b00b79b7612c1d4f0d3d34e8a8 linux-next)
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
tools/testing/selftests/net/test_vxlan_under_vrf.sh

index 60442adedea6e969c0974462b205d3d5b54766a3..9b919ac98ee42ce92c94706ee60f4c60cab5e282 100755 (executable)
@@ -50,7 +50,7 @@ cleanup() {
     ip link del veth-tap 2>/dev/null || true
 
     for ns in hv-1 hv-2 vm-1 vm-2; do
-        ip netns del $ns || true
+        ip netns del $ns 2>/dev/null || true
     done
 }