1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-31 01:47:15 +03:00

test-network: add test for small MTU for vcan

Prompted by https://github.com/systemd/systemd/issues/30140#issuecomment-1837973580.

(cherry picked from commit 470a329d9849d108e28f72d00dd130d130cebb01)
(cherry picked from commit 16f193d51861db4befd6228b773cf7a86c03339a)
(cherry picked from commit 6f584de56e86170c8e4bd426a4b4829b8343f1c0)
(cherry picked from commit 1cdd0c2804c9e991d5d083a32da36cc69a0b78dc)
This commit is contained in:
Yu Watanabe 2023-12-06 14:55:03 +09:00 committed by Luca Boccassi
parent 7826d80ced
commit 0c8872aa40
4 changed files with 23 additions and 2 deletions

View File

@ -2,3 +2,4 @@
[NetDev]
Name=vcan99
Kind=vcan
MTUBytes=16

View File

@ -0,0 +1,4 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
[NetDev]
Name=vcan98
Kind=vcan

View File

@ -0,0 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
[Match]
Name=vcan98
[Link]
MTUBytes=16

View File

@ -1520,10 +1520,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):