1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

test-network: add a basic test for nlmon

This commit is contained in:
Yu Watanabe 2019-05-23 11:37:53 +09:00
parent d61e4c5b6e
commit 811f33d0b1
3 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,3 @@
[NetDev]
Kind=nlmon
Name=nlmon99

View File

@ -0,0 +1,6 @@
[Match]
Name=nlmon99
[Network]
LinkLocalAddressing=yes
IPv6AcceptRA=no

View File

@ -248,6 +248,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
'isataptun99',
'macvlan99',
'macvtap99',
'nlmon99',
'sittun96',
'sittun97',
'sittun98',
@ -318,6 +319,8 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
'25-macsec.key',
'25-macsec.netdev',
'25-macsec.network',
'25-nlmon.netdev',
'25-nlmon.network',
'25-sit-tunnel-local-any.netdev',
'25-sit-tunnel-remote-any.netdev',
'25-sit-tunnel.netdev',
@ -975,6 +978,11 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
self.assertRegex(output, 'RXSC: 8c16456c83a90002, state on')
self.assertRegex(output, '0: PN [0-9]*, state off, key 02030400000000000000000000000000')
def test_nlmon(self):
self.copy_unit_to_networkd_unit_path('25-nlmon.netdev', '25-nlmon.network')
self.start_networkd()
self.wait_online(['nlmon99:carrier'])
class NetworkdL2TPTests(unittest.TestCase, Utilities):