mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
test-network: add a testcase for recreating stacked netdevs
This commit is contained in:
parent
2f117922d4
commit
1d0c9bd753
@ -1183,6 +1183,25 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
|
||||
self.assertRegex(output, ' mtu 2000 ')
|
||||
self.assertRegex(output, 'macvlan mode ' + mode + ' ')
|
||||
|
||||
rc = call("ip link del test1")
|
||||
self.assertEqual(rc, 0)
|
||||
time.sleep(1)
|
||||
|
||||
rc = call("ip link add test1 type dummy")
|
||||
self.assertEqual(rc, 0)
|
||||
time.sleep(1)
|
||||
|
||||
self.wait_online(['macvlan99:degraded', 'test1:degraded'])
|
||||
|
||||
output = check_output('ip -d link show test1')
|
||||
print(output)
|
||||
self.assertRegex(output, ' mtu 2000 ')
|
||||
|
||||
output = check_output('ip -d link show macvlan99')
|
||||
print(output)
|
||||
self.assertRegex(output, ' mtu 2000 ')
|
||||
self.assertRegex(output, 'macvlan mode ' + mode + ' ')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('ipvlan')
|
||||
def test_ipvlan(self):
|
||||
for mode, flag in [['L2', 'private'], ['L3', 'vepa'], ['L3S', 'bridge']]:
|
||||
|
Loading…
Reference in New Issue
Block a user