1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

test-network: add test for ConfigureWithoutCarrier=

This commit is contained in:
Yu Watanabe 2019-06-14 05:25:00 +09:00
parent 463797c104
commit 1285edf39c
2 changed files with 10 additions and 2 deletions

View File

@ -0,0 +1,7 @@
[Match]
Name=bridge99
[Network]
LinkLocalAddressing=yes
IPv6AcceptRA=no
ConfigureWithoutCarrier=yes

View File

@ -471,6 +471,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
'25-bond.netdev',
'25-bond-balanced-tlb.netdev',
'25-bridge.netdev',
'25-bridge-configure-without-carrier.network',
'25-bridge.network',
'25-erspan-tunnel-local-any.netdev',
'25-erspan-tunnel.netdev',
@ -585,10 +586,10 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
self.check_operstate('test1', 'degraded')
def test_bridge(self):
copy_unit_to_networkd_unit_path('25-bridge.netdev')
copy_unit_to_networkd_unit_path('25-bridge.netdev', '25-bridge-configure-without-carrier.network')
start_networkd(0)
wait_online(['bridge99:off'])
wait_online(['bridge99:no-carrier'])
tick = os.sysconf('SC_CLK_TCK')
self.assertEqual(9, round(float(read_link_attr('bridge99', 'bridge', 'hello_time')) / tick))