1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 18:55:40 +03:00

test-network: add a testcase for recreating stacked netdevs

This commit is contained in:
Yu Watanabe 2021-08-12 14:45:40 +09:00
parent 2f117922d4
commit 1d0c9bd753

View File

@ -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']]: