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

test-network: add test for ENOBUFS issue #17012

The issue seems already fixed by PR #16982 and its follow-up commit
4934ba2121.
This commit is contained in:
Yu Watanabe 2020-09-11 13:57:07 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent e67b818c2f
commit 766f8f388f
2 changed files with 270 additions and 0 deletions

View File

@ -51,3 +51,261 @@ Peer=2001:db8:0:f103::10/128
[Address]
Address=::/64
# test for ENOBUFS issue #17012
[Network]
Address=10.3.3.1/16
Address=10.3.3.2/16
Address=10.3.3.3/16
Address=10.3.3.4/16
Address=10.3.3.5/16
Address=10.3.3.6/16
Address=10.3.3.7/16
Address=10.3.3.8/16
Address=10.3.3.9/16
Address=10.3.3.10/16
Address=10.3.3.11/16
Address=10.3.3.12/16
Address=10.3.3.13/16
Address=10.3.3.14/16
Address=10.3.3.15/16
Address=10.3.3.16/16
Address=10.3.3.17/16
Address=10.3.3.18/16
Address=10.3.3.19/16
Address=10.3.3.20/16
Address=10.3.3.21/16
Address=10.3.3.22/16
Address=10.3.3.23/16
Address=10.3.3.24/16
Address=10.3.3.25/16
Address=10.3.3.26/16
Address=10.3.3.27/16
Address=10.3.3.28/16
Address=10.3.3.29/16
Address=10.3.3.30/16
Address=10.3.3.31/16
Address=10.3.3.32/16
Address=10.3.3.33/16
Address=10.3.3.34/16
Address=10.3.3.35/16
Address=10.3.3.36/16
Address=10.3.3.37/16
Address=10.3.3.38/16
Address=10.3.3.39/16
Address=10.3.3.40/16
Address=10.3.3.41/16
Address=10.3.3.42/16
Address=10.3.3.43/16
Address=10.3.3.44/16
Address=10.3.3.45/16
Address=10.3.3.46/16
Address=10.3.3.47/16
Address=10.3.3.48/16
Address=10.3.3.49/16
Address=10.3.3.50/16
Address=10.3.3.51/16
Address=10.3.3.52/16
Address=10.3.3.53/16
Address=10.3.3.54/16
Address=10.3.3.55/16
Address=10.3.3.56/16
Address=10.3.3.57/16
Address=10.3.3.58/16
Address=10.3.3.59/16
Address=10.3.3.60/16
Address=10.3.3.61/16
Address=10.3.3.62/16
Address=10.3.3.63/16
Address=10.3.3.64/16
Address=10.3.3.65/16
Address=10.3.3.66/16
Address=10.3.3.67/16
Address=10.3.3.68/16
Address=10.3.3.69/16
Address=10.3.3.70/16
Address=10.3.3.71/16
Address=10.3.3.72/16
Address=10.3.3.73/16
Address=10.3.3.74/16
Address=10.3.3.75/16
Address=10.3.3.76/16
Address=10.3.3.77/16
Address=10.3.3.78/16
Address=10.3.3.79/16
Address=10.3.3.80/16
Address=10.3.3.81/16
Address=10.3.3.82/16
Address=10.3.3.83/16
Address=10.3.3.84/16
Address=10.3.3.85/16
Address=10.3.3.86/16
Address=10.3.3.87/16
Address=10.3.3.88/16
Address=10.3.3.89/16
Address=10.3.3.90/16
Address=10.3.3.91/16
Address=10.3.3.92/16
Address=10.3.3.93/16
Address=10.3.3.94/16
Address=10.3.3.95/16
Address=10.3.3.96/16
Address=10.3.3.97/16
Address=10.3.3.98/16
Address=10.3.3.99/16
Address=10.3.3.100/16
Address=10.3.3.101/16
Address=10.3.3.101/16
Address=10.3.3.102/16
Address=10.3.3.103/16
Address=10.3.3.104/16
Address=10.3.3.105/16
Address=10.3.3.106/16
Address=10.3.3.107/16
Address=10.3.3.108/16
Address=10.3.3.109/16
Address=10.3.3.110/16
Address=10.3.3.111/16
Address=10.3.3.112/16
Address=10.3.3.113/16
Address=10.3.3.114/16
Address=10.3.3.115/16
Address=10.3.3.116/16
Address=10.3.3.117/16
Address=10.3.3.118/16
Address=10.3.3.119/16
Address=10.3.3.120/16
Address=10.3.3.121/16
Address=10.3.3.122/16
Address=10.3.3.123/16
Address=10.3.3.124/16
Address=10.3.3.125/16
Address=10.3.3.126/16
Address=10.3.3.127/16
Address=10.3.3.128/16
Address=10.3.3.129/16
Address=10.3.3.130/16
Address=10.3.3.131/16
Address=10.3.3.132/16
Address=10.3.3.133/16
Address=10.3.3.134/16
Address=10.3.3.135/16
Address=10.3.3.136/16
Address=10.3.3.137/16
Address=10.3.3.138/16
Address=10.3.3.139/16
Address=10.3.3.140/16
Address=10.3.3.141/16
Address=10.3.3.142/16
Address=10.3.3.143/16
Address=10.3.3.144/16
Address=10.3.3.145/16
Address=10.3.3.146/16
Address=10.3.3.147/16
Address=10.3.3.148/16
Address=10.3.3.149/16
Address=10.3.3.150/16
Address=10.3.3.151/16
Address=10.3.3.152/16
Address=10.3.3.153/16
Address=10.3.3.154/16
Address=10.3.3.155/16
Address=10.3.3.156/16
Address=10.3.3.157/16
Address=10.3.3.158/16
Address=10.3.3.159/16
Address=10.3.3.160/16
Address=10.3.3.161/16
Address=10.3.3.162/16
Address=10.3.3.163/16
Address=10.3.3.164/16
Address=10.3.3.165/16
Address=10.3.3.166/16
Address=10.3.3.167/16
Address=10.3.3.168/16
Address=10.3.3.169/16
Address=10.3.3.170/16
Address=10.3.3.171/16
Address=10.3.3.172/16
Address=10.3.3.173/16
Address=10.3.3.174/16
Address=10.3.3.175/16
Address=10.3.3.176/16
Address=10.3.3.177/16
Address=10.3.3.178/16
Address=10.3.3.179/16
Address=10.3.3.180/16
Address=10.3.3.181/16
Address=10.3.3.182/16
Address=10.3.3.183/16
Address=10.3.3.184/16
Address=10.3.3.185/16
Address=10.3.3.186/16
Address=10.3.3.187/16
Address=10.3.3.188/16
Address=10.3.3.189/16
Address=10.3.3.190/16
Address=10.3.3.191/16
Address=10.3.3.192/16
Address=10.3.3.193/16
Address=10.3.3.194/16
Address=10.3.3.195/16
Address=10.3.3.196/16
Address=10.3.3.197/16
Address=10.3.3.198/16
Address=10.3.3.199/16
Address=10.3.3.200/16
Address=10.3.3.201/16
Address=10.3.3.202/16
Address=10.3.3.203/16
Address=10.3.3.204/16
Address=10.3.3.205/16
Address=10.3.3.206/16
Address=10.3.3.207/16
Address=10.3.3.208/16
Address=10.3.3.209/16
Address=10.3.3.210/16
Address=10.3.3.211/16
Address=10.3.3.212/16
Address=10.3.3.213/16
Address=10.3.3.214/16
Address=10.3.3.215/16
Address=10.3.3.216/16
Address=10.3.3.217/16
Address=10.3.3.218/16
Address=10.3.3.219/16
Address=10.3.3.220/16
Address=10.3.3.221/16
Address=10.3.3.222/16
Address=10.3.3.223/16
Address=10.3.3.224/16
Address=10.3.3.225/16
Address=10.3.3.226/16
Address=10.3.3.227/16
Address=10.3.3.228/16
Address=10.3.3.229/16
Address=10.3.3.230/16
Address=10.3.3.231/16
Address=10.3.3.232/16
Address=10.3.3.233/16
Address=10.3.3.234/16
Address=10.3.3.235/16
Address=10.3.3.236/16
Address=10.3.3.237/16
Address=10.3.3.238/16
Address=10.3.3.239/16
Address=10.3.3.240/16
Address=10.3.3.241/16
Address=10.3.3.242/16
Address=10.3.3.243/16
Address=10.3.3.244/16
Address=10.3.3.245/16
Address=10.3.3.246/16
Address=10.3.3.247/16
Address=10.3.3.248/16
Address=10.3.3.249/16
Address=10.3.3.250/16
Address=10.3.3.251/16
Address=10.3.3.252/16
Address=10.3.3.253/16
Address=10.3.3.254/16

View File

@ -1767,6 +1767,10 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
self.assertRegex(output, 'inet 10.1.2.4/16 brd 10.1.255.255 scope global secondary dummy98')
self.assertRegex(output, 'inet 10.2.2.4/16 brd 10.2.255.255 scope global dummy98')
# test for ENOBUFS issue #17012
for i in range(1,254):
self.assertRegex(output, f'inet 10.3.3.{i}/16 brd 10.3.255.255')
# invalid sections
self.assertNotRegex(output, '10.10.0.1/16')
self.assertNotRegex(output, '10.10.0.2/16')
@ -1792,6 +1796,14 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
self.assertRegex(output, 'inet6 2001:db8:0:f103::20 peer 2001:db8:0:f103::10/128 scope global')
self.assertRegex(output, 'inet6 fd[0-9a-f:]*1/64 scope global')
restart_networkd()
self.wait_online(['dummy98:routable'])
# test for ENOBUFS issue #17012
output = check_output('ip -4 address show dev dummy98')
for i in range(1,254):
self.assertRegex(output, f'inet 10.3.3.{i}/16 brd 10.3.255.255')
def test_address_preferred_lifetime_zero_ipv6(self):
copy_unit_to_networkd_unit_path('25-address-preferred-lifetime-zero.network', '12-dummy.netdev')
start_networkd(5)