From: Lukasz Majewski Date: Tue, 7 May 2024 09:11:55 +0000 (+0200) Subject: test: hsr: Call cleanup_all_ns when hsr_redbox.sh script exits X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=252aa6d53931381bd774acd06866ed0fb1976ead;p=linux.git 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 Reviewed-by: Simon Horman Signed-off-by: David S. Miller --- diff --git a/tools/testing/selftests/net/hsr/hsr_redbox.sh b/tools/testing/selftests/net/hsr/hsr_redbox.sh index 52e0412c32e60..db69be95ecb35 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