Skip to contentSkip to conversation

test: hsr: Call cleanup_all_ns when hsr_redbox.sh script exits

PATCH Applied Lukasz Majewski 3 participants 3 messages May 7, 2024 – May 8, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test: hsr: Call cleanup_all_ns when hsr_redbox.sh script exits

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.

---
 tools/testing/selftests/net/hsr/hsr_redbox.sh | 2 ++
 1 file changed, 2 insertions(+)
tools/testing/selftests/net/hsr/hsr_redbox.sh +2 -0
index 52e0412c32e6..db69be95ecb3 100755
@@ -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
 
Signature · 1 line
2.20.1
#2 lore raw
In reply to Lukasz Majewski
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Quoted 8 lines · 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.

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

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html