Message ID | 20240813-upstream-net-20240813-selftests-net-lib-kill-v1-1-27b689b248b8@kernel.org |
---|---|
State | Accepted |
Commit | 7965a7f32a53d9ad807ce2c53bdda69ba104974f |
Headers | show |
Series | [net] selftests: net: lib: kill PIDs before del netns | expand |
diff --git a/tools/testing/selftests/net/lib.sh b/tools/testing/selftests/net/lib.sh index d0219032f773..8ee4489238ca 100644 --- a/tools/testing/selftests/net/lib.sh +++ b/tools/testing/selftests/net/lib.sh @@ -146,6 +146,7 @@ cleanup_ns() for ns in "$@"; do [ -z "${ns}" ] && continue + ip netns pids "${ns}" 2> /dev/null | xargs -r kill || true ip netns delete "${ns}" &> /dev/null || true if ! busywait $BUSYWAIT_TIMEOUT ip netns list \| grep -vq "^$ns$" &> /dev/null; then echo "Warn: Failed to remove namespace $ns"