test-network: add test for small MTU for vcan

Prompted by https://github.com/systemd/systemd/issues/30140#issuecomment-1837973580.
This commit is contained in:
Yu Watanabe
2023-12-08 10:47:42 +09:00
parent 941f8e1399
commit 470a329d98
4 changed files with 23 additions and 2 deletions
+12 -2
View File
@@ -1725,10 +1725,20 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
@expectedFailureIfModuleIsNotAvailable('vcan')
def test_vcan(self):
copy_network_unit('25-vcan.netdev', '26-netdev-link-local-addressing-yes.network')
copy_network_unit('25-vcan.netdev', '26-netdev-link-local-addressing-yes.network',
'25-vcan98.netdev', '25-vcan98.network')
start_networkd()
self.wait_online(['vcan99:carrier'])
self.wait_online(['vcan99:carrier', 'vcan98:carrier'])
# https://github.com/systemd/systemd/issues/30140
output = check_output('ip -d link show vcan99')
print(output)
self.assertIn('mtu 16 ', output)
output = check_output('ip -d link show vcan98')
print(output)
self.assertIn('mtu 16 ', output)
@expectedFailureIfModuleIsNotAvailable('vxcan')
def test_vxcan(self):