Skip to content

Commit 252aa6d

Browse files
Lukasz Majewskidavem330
authored andcommitted
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. Signed-off-by: Lukasz Majewski <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1d3985e commit 252aa6d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/testing/selftests/net/hsr/hsr_redbox.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ setup_hsr_interfaces()
8686
check_prerequisites
8787
setup_ns ns1 ns2 ns3
8888

89+
trap cleanup_all_ns EXIT
90+
8991
setup_hsr_interfaces 1
9092
do_complete_ping_test
9193

0 commit comments

Comments
 (0)