tests: Clarify the interface might not be on the host

We try to delete the interface, but it lot of tests it won't be there
unless we failed to move it to the container. Let's just clarify that in
a comment and redirect the error output to /dev/null, as it seems an
error otherwise while it is completely normal.

Signed-off-by: Rodrigo Campos <rodrigo@amutable.com>
(cherry picked from commit bb9d1ccaba)
This commit is contained in:
Rodrigo Campos
2026-06-17 13:20:31 +02:00
committed by Rodrigo Campos Catelin
parent cc0c204adb
commit 0a4cc77570
+4 -1
View File
@@ -35,7 +35,10 @@ function setup() {
} }
function teardown() { function teardown() {
ip link del dev dummy0 # The interface might be on the host or not, depending the test. If it's on the host, let's
# delete it.
ip link del dev dummy0 2>/dev/null
delete_netns delete_netns
teardown_bundle teardown_bundle
} }