mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
test-network: add test for [BridgeMDB] section
This commit is contained in:
parent
8e412d64ce
commit
cc0276cc3e
5
test/test-network/conf/26-bridge-mdb-master.network
Normal file
5
test/test-network/conf/26-bridge-mdb-master.network
Normal file
@ -0,0 +1,5 @@
|
||||
[Match]
|
||||
Name=bridge99
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=false
|
14
test/test-network/conf/26-bridge-mdb-slave.network
Normal file
14
test/test-network/conf/26-bridge-mdb-slave.network
Normal file
@ -0,0 +1,14 @@
|
||||
[Match]
|
||||
Name=test1
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=no
|
||||
Bridge=bridge99
|
||||
|
||||
[BridgeMDB]
|
||||
VLANId=4064
|
||||
MulticastGroupAddress=ff02:aaaa:fee5:0000:0000:0000:0001:0003
|
||||
|
||||
[BridgeMDB]
|
||||
VLANId=4065
|
||||
MulticastGroupAddress=224.0.1.1
|
@ -2870,6 +2870,8 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
|
||||
'12-dummy.netdev',
|
||||
'26-bridge.netdev',
|
||||
'26-bridge-configure-without-carrier.network',
|
||||
'26-bridge-mdb-master.network',
|
||||
'26-bridge-mdb-slave.network',
|
||||
'26-bridge-slave-interface-1.network',
|
||||
'26-bridge-slave-interface-2.network',
|
||||
'26-bridge-vlan-master.network',
|
||||
@ -2910,6 +2912,17 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
|
||||
self.assertRegex(output, f'{i}')
|
||||
self.assertNotRegex(output, '4095')
|
||||
|
||||
def test_bridge_mdb(self):
|
||||
copy_unit_to_networkd_unit_path('11-dummy.netdev', '26-bridge-mdb-slave.network',
|
||||
'26-bridge.netdev', '26-bridge-mdb-master.network')
|
||||
start_networkd()
|
||||
self.wait_online(['test1:enslaved', 'bridge99:degraded'])
|
||||
|
||||
output = check_output('bridge mdb show dev bridge99')
|
||||
print(output)
|
||||
self.assertRegex(output, 'dev bridge99 port test1 grp ff02:aaaa:fee5::1:3 permanent *vid 4064')
|
||||
self.assertRegex(output, 'dev bridge99 port test1 grp 224.0.1.1 permanent *vid 4065')
|
||||
|
||||
def test_bridge_property(self):
|
||||
copy_unit_to_networkd_unit_path('11-dummy.netdev', '12-dummy.netdev', '26-bridge.netdev',
|
||||
'26-bridge-slave-interface-1.network', '26-bridge-slave-interface-2.network',
|
||||
|
Loading…
Reference in New Issue
Block a user