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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <geliang@xxxxxxxxxx>
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>

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.

...




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux