]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: add test for removal of nexthops that we do not receive reply from... 30716/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 4 Jan 2024 18:49:32 +0000 (03:49 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 5 Jan 2024 10:18:58 +0000 (19:18 +0900)
test/test-network/systemd-networkd-tests.py

index 0a87c5d239fe726023ff42af9d0ddb681b1ef55d..c50c17ac9c24d6caca454c82fdf535181e3d87fe 100755 (executable)
@@ -3996,7 +3996,11 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
 
         remove_network_unit('25-nexthop-nothing.network', '25-nexthop-dummy-2.network')
         copy_network_unit('25-nexthop-1.network', '25-nexthop-dummy-1.network')
-        networkctl_reload()
+        # Of course, networkctl_reconfigure() below is unnecessary in normal operation, but it is intentional
+        # here to test reconfiguring with different .network files does not trigger race.
+        # See also comments in link_drop_requests().
+        networkctl_reconfigure('dummy98') # reconfigured with 25-nexthop-dummy-2.network
+        networkctl_reload()               # reconfigured with 25-nexthop-dummy-1.network
 
         self.check_nexthop(manage_foreign_nexthops, first=True)