Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Mar 2021 15:17:57 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: e180cc2fb9c5 - stable/12 - bridge tests: Test deleting a bridge with members
Message-ID:  <202103021517.122FHvBS039810@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=e180cc2fb9c5d7eb2d198470f54f7dbebbf4bf7c

commit e180cc2fb9c5d7eb2d198470f54f7dbebbf4bf7c
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2020-04-17 14:57:15 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2021-03-02 13:03:06 +0000

    bridge tests: Test deleting a bridge with members
    
    Reviewed by:    philip, emaste
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D24337
    
    (cherry picked from commit 3f359bfd47430183f69b9c03f34458217e7c7970)
---
 tests/sys/net/if_bridge_test.sh | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/tests/sys/net/if_bridge_test.sh b/tests/sys/net/if_bridge_test.sh
index 7b26b97967ad..cb9c297220b6 100755
--- a/tests/sys/net/if_bridge_test.sh
+++ b/tests/sys/net/if_bridge_test.sh
@@ -245,10 +245,37 @@ span_cleanup()
 	vnet_cleanup
 }
 
+atf_test_case "delete_with_members" "cleanup"
+delete_with_members_head()
+{
+	atf_set descr 'Delete a bridge which still has member interfaces'
+	atf_set require.user root
+}
+
+delete_with_members_body()
+{
+	vnet_init
+
+	bridge=$(vnet_mkbridge)
+	epair=$(vnet_mkepair)
+
+	ifconfig ${bridge} 192.0.2.1/24 up
+	ifconfig ${epair}a up
+	ifconfig ${bridge} addm ${epair}a
+
+	ifconfig ${bridge} destroy
+}
+
+delete_with_members_cleanup()
+{
+	vnet_cleanup
+}
+
 atf_init_test_cases()
 {
 	atf_add_test_case "bridge_transmit_ipv4_unicast"
 	atf_add_test_case "stp"
 	atf_add_test_case "static"
 	atf_add_test_case "span"
+	atf_add_test_case "delete_with_members"
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103021517.122FHvBS039810>