selftests: net: lib: remove ns from list after clean-up
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Fri, 7 Jun 2024 16:31:03 +0000 (18:31 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 12 Jun 2024 02:30:25 +0000 (19:30 -0700)
commit92fe5670271a58bb951646225ea367bb86f7feb3
tree276a7fc095c07e2706416822dfcb10722a2f675f
parent7e0620bc6a5ec6b340a0be40054f294ca26c010f
selftests: net: lib: remove ns from list after clean-up

Instead of only appending items to the list, removing them when the
netns has been deleted.

By doing that, we can make sure 'cleanup_all_ns()' is not trying to
remove already deleted netns.

Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://lore.kernel.org/r/20240607-upstream-net-next-20240607-selftests-mptcp-net-lib-v1-2-e36986faac94@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/lib.sh