diff mbox series

[net-next] test: hsr: Call cleanup_all_ns when hsr_redbox.sh script exits

Message ID 20240507091155.3504198-1-lukma@denx.de (mailing list archive)
State Accepted
Commit 252aa6d53931381bd774acd06866ed0fb1976ead
Delegated to: Netdev Maintainers
Headers show
Series [net-next] test: hsr: Call cleanup_all_ns when hsr_redbox.sh script exits | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/build_tools success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success net selftest script(s) already in Makefile
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-05-08--03-00 (tests: 1005)

Commit Message

Lukasz Majewski May 7, 2024, 9:11 a.m. UTC
Without this change the created netns instances are not cleared after
this script execution. To fix this problem the cleanup_all_ns function
from ../lib.sh is called.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
 tools/testing/selftests/net/hsr/hsr_redbox.sh | 2 ++
 1 file changed, 2 insertions(+)

Comments

Simon Horman May 8, 2024, 9:07 a.m. UTC | #1
On Tue, May 07, 2024 at 11:11:55AM +0200, Lukasz Majewski wrote:
> Without this change the created netns instances are not cleared after
> this script execution. To fix this problem the cleanup_all_ns function
> from ../lib.sh is called.
> 
> Signed-off-by: Lukasz Majewski <lukma@denx.de>

Reviewed-by: Simon Horman <horms@kernel.org>
patchwork-bot+netdevbpf@kernel.org May 8, 2024, 11:30 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Tue,  7 May 2024 11:11:55 +0200 you wrote:
> Without this change the created netns instances are not cleared after
> this script execution. To fix this problem the cleanup_all_ns function
> from ../lib.sh is called.
> 
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> ---
>  tools/testing/selftests/net/hsr/hsr_redbox.sh | 2 ++
>  1 file changed, 2 insertions(+)

Here is the summary with links:
  - [net-next] test: hsr: Call cleanup_all_ns when hsr_redbox.sh script exits
    https://git.kernel.org/netdev/net-next/c/252aa6d53931

You are awesome, thank you!
diff mbox series

Patch

diff --git a/tools/testing/selftests/net/hsr/hsr_redbox.sh b/tools/testing/selftests/net/hsr/hsr_redbox.sh
index 52e0412c32e6..db69be95ecb3 100755
--- a/tools/testing/selftests/net/hsr/hsr_redbox.sh
+++ b/tools/testing/selftests/net/hsr/hsr_redbox.sh
@@ -86,6 +86,8 @@  setup_hsr_interfaces()
 check_prerequisites
 setup_ns ns1 ns2 ns3
 
+trap cleanup_all_ns EXIT
+
 setup_hsr_interfaces 1
 do_complete_ping_test