From: Yu Watanabe Date: Mon, 6 Dec 2021 00:02:37 +0000 (+0900) Subject: test-network: make start_isc_dhcpd() take IP version X-Git-Tag: v250-rc1~68^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5f7f1f824fdd238bdb1712dc54d11c20bdc309c8;p=thirdparty%2Fsystemd.git test-network: make start_isc_dhcpd() take IP version --- diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index b8655db370b..3d25704832e 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -547,9 +547,9 @@ def remove_dnsmasq_log_file(): if os.path.exists(dnsmasq_log_file): os.remove(dnsmasq_log_file) -def start_isc_dhcpd(interface, conf_file): +def start_isc_dhcpd(interface, conf_file, ip): conf_file_path = os.path.join(networkd_ci_path, conf_file) - isc_dhcpd_command = f'dhcpd -6 -cf {conf_file_path} -lf {isc_dhcpd_lease_file} -pf {isc_dhcpd_pid_file} {interface}' + isc_dhcpd_command = f'dhcpd {ip} -cf {conf_file_path} -lf {isc_dhcpd_lease_file} -pf {isc_dhcpd_pid_file} {interface}' Path(isc_dhcpd_lease_file).touch() check_output(isc_dhcpd_command) @@ -5048,7 +5048,7 @@ class NetworkdDHCP6PDTests(unittest.TestCase, Utilities): start_networkd() self.wait_online(['veth-peer:carrier']) - start_isc_dhcpd('veth-peer', 'isc-dhcpd-dhcp6pd.conf') + start_isc_dhcpd('veth-peer', 'isc-dhcpd-dhcp6pd.conf', ip='-6') self.wait_online(['veth-peer:routable', 'veth99:routable', 'test1:routable', 'dummy98:routable', 'dummy99:degraded', 'veth97:routable', 'veth97-peer:routable', 'veth98:routable', 'veth98-peer:routable'])