summaryrefslogtreecommitdiff
path: root/tools/crypto
diff options
context:
space:
mode:
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>2024-06-05 11:21:17 +0200
committerJakub Kicinski <kuba@kernel.org>2024-06-06 08:29:07 -0700
commit79322174bcc780b99795cb89d237b26006a8b94b (patch)
treed2b93cdba177f829f4c90306e8d63ea4235f8170 /tools/crypto
parent41b02ea4c0adfcc6761fbfed42c3ce6b6412d881 (diff)
selftests: net: lib: avoid error removing empty netns name
If there is an error to create the first netns with 'setup_ns()', 'cleanup_ns()' will be called with an empty string as first parameter. The consequences is that 'cleanup_ns()' will try to delete an invalid netns, and wait 20 seconds if the netns list is empty. Instead of just checking if the name is not empty, convert the string separated by spaces to an array. Manipulating the array is cleaner, and calling 'cleanup_ns()' with an empty array will be a no-op. Fixes: 25ae948b4478 ("selftests/net: add lib.sh") Cc: stable@vger.kernel.org Acked-by: Geliang Tang <geliang@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Reviewed-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Hangbin Liu <liuhangbin@gmail.com> Link: https://lore.kernel.org/r/20240605-upstream-net-20240605-selftests-net-lib-fixes-v1-2-b3afadd368c9@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/crypto')
0 files changed, 0 insertions, 0 deletions