Subject: Re: [PATCH net-next 2/6] selftests: net: lib: remove ns from list after clean-up

From: Simon Horman <[email-masked]>
Date: Fri, 14 Jun 2024 11:40:06 +0100

On Fri, Jun 07, 2024 at 06:31:03PM +0200, Matthieu Baerts (NGI0) wrote:
> 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 <[email-masked]>
> Signed-off-by: Matthieu Baerts (NGI0) <[email-masked]>

Hi Matthieu,

I like this, and I am happy to see that it has been accepted.

I do wonder if we can go a step further and use an associative array for
ns_list (maybe renamed).  I think this would reduce remove_ns_list to
something like:

	unset ns_list["$item"]

OTOH, perhaps this breaks with older versions of bash that we still
care about.

...