]> 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>
Fri, 11 Dec 2020 04:24:20 +0000 (12:24 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 15 Dec 2020 01:38:12 +0000 (17:38 -0800)
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>
tools/testing/selftests/net/test_vxlan_under_vrf.sh

index 09f9ed92cbe4c8b6e1837698aa273b2f7848145b..534c8b7699ab9825f39b808296eae37545a4be92 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
 }