1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00

test-network: add a basic test for ipvtap

This commit is contained in:
Yu Watanabe 2019-05-16 09:48:34 +09:00
parent 69c317a07f
commit 956c8feca4
3 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,6 @@
[NetDev]
Name=ipvtap99
Kind=ipvtap
[IPVLAN]
Mode=L2

View File

@ -0,0 +1,5 @@
[Match]
Name=test1
[Network]
IPVTAP=ipvtap99

View File

@ -222,6 +222,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
'ipiptun98', 'ipiptun98',
'ipiptun99', 'ipiptun99',
'ipvlan99', 'ipvlan99',
'ipvtap99',
'isataptun99', 'isataptun99',
'macvlan99', 'macvlan99',
'macvtap99', 'macvtap99',
@ -289,6 +290,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
'25-ipip-tunnel-remote-any.netdev', '25-ipip-tunnel-remote-any.netdev',
'25-ipip-tunnel.netdev', '25-ipip-tunnel.netdev',
'25-ipvlan.netdev', '25-ipvlan.netdev',
'25-ipvtap.netdev',
'25-isatap-tunnel.netdev', '25-isatap-tunnel.netdev',
'25-macsec.key', '25-macsec.key',
'25-macsec.netdev', '25-macsec.netdev',
@ -324,6 +326,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
'ip6tnl.network', 'ip6tnl.network',
'ipip.network', 'ipip.network',
'ipvlan.network', 'ipvlan.network',
'ipvtap.network',
'isatap.network', 'isatap.network',
'macsec.network', 'macsec.network',
'macvlan.network', 'macvlan.network',
@ -492,6 +495,13 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
self.assertTrue(self.link_exits('ipvlan99')) self.assertTrue(self.link_exits('ipvlan99'))
@expectedFailureIfModuleIsNotAvailable('ipvtap')
def test_ipvtap(self):
self.copy_unit_to_networkd_unit_path('25-ipvtap.netdev', '11-dummy.netdev', 'ipvtap.network')
self.start_networkd()
self.assertTrue(self.link_exits('ipvtap99'))
def test_veth(self): def test_veth(self):
self.copy_unit_to_networkd_unit_path('25-veth.netdev') self.copy_unit_to_networkd_unit_path('25-veth.netdev')
self.start_networkd() self.start_networkd()