From: Yu Watanabe Date: Fri, 8 Jul 2022 22:03:31 +0000 (+0900) Subject: test-network: drop meaningless test X-Git-Tag: v252-rc1~690^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b17947d9cf70b0113f9aeadae681cd64f8003c2f;p=thirdparty%2Fsystemd.git test-network: drop meaningless test 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. --- 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 index 8a8b087bf8e..00000000000 --- a/test/test-network/conf/25-dhcp-client-reassign-static-routes-ipv6.network +++ /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 diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 850e490f8a0..b67ad702fc7 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -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()