]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: drop meaningless test
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 8 Jul 2022 22:03:31 +0000 (07:03 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 9 Jul 2022 02:44:25 +0000 (11:44 +0900)
On DHCPv6 lease renew, the kernel do not drop static routes, and hence
we do not try to reassign them. Hence, the test is mostly meaningless.

test/test-network/conf/25-dhcp-client-reassign-static-routes-ipv6.network [deleted file]
test/test-network/systemd-networkd-tests.py

diff --git a/test/test-network/conf/25-dhcp-client-reassign-static-routes-ipv6.network b/test/test-network/conf/25-dhcp-client-reassign-static-routes-ipv6.network
deleted file mode 100644 (file)
index 8a8b087..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# SPDX-License-Identifier: LGPL-2.1-or-later
-[Match]
-Name=veth99
-
-[Network]
-IPv6AcceptRA=yes
-
-[Route]
-Destination=2600:0:0:1::/64
index 850e490f8a026e8c1ca594c41073c6105e90c070..b67ad702fc74915f6d06c452c0d7d0a889986990 100755 (executable)
@@ -4490,7 +4490,6 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         '25-dhcp-client-ipv6-only.network',
         '25-dhcp-client-keep-configuration-dhcp-on-stop.network',
         '25-dhcp-client-keep-configuration-dhcp.network',
-        '25-dhcp-client-reassign-static-routes-ipv6.network',
         '25-dhcp-client-use-dns-ipv4-and-ra.network',
         '25-dhcp-client-use-dns-ipv4.network',
         '25-dhcp-client-use-dns-no.network',
@@ -4757,37 +4756,6 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         self.assertNotIn('test-hostname', output)
         self.assertNotIn('26:mtu', output)
 
-    def test_dhcp_client_reassign_static_routes_ipv6(self):
-        copy_unit_to_networkd_unit_path('25-veth.netdev', '25-dhcp-server-veth-peer.network',
-                                        '25-dhcp-client-reassign-static-routes-ipv6.network')
-        start_networkd()
-        self.wait_online(['veth-peer:carrier'])
-        start_dnsmasq(lease_time='2m')
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
-
-        output = check_output('ip address show dev veth99 scope global')
-        print(output)
-        self.assertRegex(output, r'inet6 2600::[0-9a-f]*/128 scope global (noprefixroute dynamic|dynamic noprefixroute)')
-
-        output = check_output('ip -6 route show dev veth99')
-        print(output)
-        self.assertRegex(output, r'2600::/64 proto ra metric 1024')
-        self.assertRegex(output, r'2600:0:0:1::/64 proto static metric 1024 pref medium')
-
-        stop_dnsmasq()
-        start_dnsmasq(ipv6_range='2600::30,2600::40', lease_time='2m')
-
-        # Sleep for 120 sec as the dnsmasq minimum lease time can only be set to 120
-        print('Wait for the DHCP lease to be expired')
-        time.sleep(120)
-
-        self.wait_online(['veth99:routable'])
-
-        output = check_output('ip -6 route show dev veth99')
-        print(output)
-        self.assertRegex(output, r'2600::/64 proto ra metric 1024')
-        self.assertRegex(output, r'2600:0:0:1::/64 proto static metric 1024 pref medium')
-
     def test_dhcp_keep_configuration_dhcp(self):
         copy_unit_to_networkd_unit_path('25-veth.netdev', '25-dhcp-v4-server-veth-peer.network', '25-dhcp-client-keep-configuration-dhcp.network')
         start_networkd()