Skip to content

Commit

Permalink
test: hsr: Call cleanup_all_ns when hsr_redbox.sh script exits
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Lukasz Majewski authored and David S. Miller committed May 8, 2024
1 parent 1d3985e commit 252aa6d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/testing/selftests/net/hsr/hsr_redbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 252aa6d

Please sign in to comment.