1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-26 14:04:03 +03:00

test-network: rename tun99 and tap99

The names seem to be used in AWS.

This also merges test_tun() and test_tap().
This commit is contained in:
Yu Watanabe 2022-08-06 07:04:19 +09:00
parent 17479d51cc
commit 5cdc7c89cb
3 changed files with 7 additions and 13 deletions

View File

@ -1,6 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
[NetDev]
Name=tap99
Name=testtap99
Kind=tap
[Tap]

View File

@ -1,6 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
[NetDev]
Name=tun99
Name=testtun99
Kind=tun
[Tun]

View File

@ -1352,24 +1352,18 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
self.assertRegex(output, 'link/ether 12:34:56:78:9a:bf')
self.assertRegex(output, 'mtu 1800')
def test_tun(self):
copy_network_unit('25-tun.netdev')
def test_tuntap(self):
copy_network_unit('25-tun.netdev', '25-tap.netdev')
start_networkd()
self.wait_online(['tun99:off'], setup_state='unmanaged')
self.wait_online(['testtun99:off', 'testtap99:off'], setup_state='unmanaged')
output = check_output('ip -d link show tun99')
output = check_output('ip -d link show testtun99')
print(output)
# Old ip command does not support IFF_ flags
self.assertRegex(output, 'tun (type tun pi on vnet_hdr on multi_queue|addrgenmode) ')
def test_tap(self):
copy_network_unit('25-tap.netdev')
start_networkd()
self.wait_online(['tap99:off'], setup_state='unmanaged')
output = check_output('ip -d link show tap99')
output = check_output('ip -d link show testtap99')
print(output)
# Old ip command does not support IFF_ flags
self.assertRegex(output, 'tun (type tap pi on vnet_hdr on multi_queue|addrgenmode) ')