]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
fcnal-test: kill hanging ping/nettest binaries on cleanup
authorFlorian Westphal <fw@strlen.de>
Thu, 21 Oct 2021 14:02:47 +0000 (16:02 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 22 Oct 2021 21:03:18 +0000 (14:03 -0700)
On my box I see a bunch of ping/nettest processes hanging
around after fcntal-test.sh is done.

Clean those up before netns deletion.

Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20211021140247.29691-1-fw@strlen.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/fcnal-test.sh

index 8e67a252b672f853d8483787553e508b493e3f6c..3313566ce9062e285a9872ac2ce6c2ab3c1bc652 100755 (executable)
@@ -445,10 +445,13 @@ cleanup()
                ip -netns ${NSA} link set dev ${NSA_DEV} down
                ip -netns ${NSA} link del dev ${NSA_DEV}
 
+               ip netns pids ${NSA} | xargs kill 2>/dev/null
                ip netns del ${NSA}
        fi
 
+       ip netns pids ${NSB} | xargs kill 2>/dev/null
        ip netns del ${NSB}
+       ip netns pids ${NSC} | xargs kill 2>/dev/null
        ip netns del ${NSC} >/dev/null 2>&1
 }