netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next PATCH] test: hsr: Call cleanup_all_ns when hsr_redbox.sh script exits
@ 2024-05-07  9:11 Lukasz Majewski
  2024-05-08  9:07 ` Simon Horman
  2024-05-08 11:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Lukasz Majewski @ 2024-05-07  9:11 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Eric Dumazet, David S. Miller, Paolo Abeni, Shuah Khan, netdev,
	linux-kselftest, linux-kernel, Lukasz Majewski

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(+)

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
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-08 11:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-07  9:11 [net-next PATCH] test: hsr: Call cleanup_all_ns when hsr_redbox.sh script exits Lukasz Majewski
2024-05-08  9:07 ` Simon Horman
2024-05-08 11:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).