]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - test/test-network/systemd-networkd-tests.py
network: add mechanism to configure default UseDomains= setting, update man page...
[thirdparty/systemd.git] / test / test-network / systemd-networkd-tests.py
index 52461eef02883fbbdd865fbff067b0c863c15212..86a0ff12b46aec047a27d7cf5f64d28274332d5d 100755 (executable)
@@ -51,18 +51,18 @@ radvd_pid_file = '/run/networkd-ci/test-radvd.pid'
 
 systemd_lib_paths = ['/usr/lib/systemd', '/lib/systemd']
 which_paths = ':'.join(systemd_lib_paths + os.getenv('PATH', os.defpath).lstrip(':').split(':'))
-systemd_source_dir = None
 
 networkd_bin = shutil.which('systemd-networkd', path=which_paths)
 resolved_bin = shutil.which('systemd-resolved', path=which_paths)
 timesyncd_bin = shutil.which('systemd-timesyncd', path=which_paths)
-udevd_bin = shutil.which('systemd-udevd', path=which_paths)
 wait_online_bin = shutil.which('systemd-networkd-wait-online', path=which_paths)
 networkctl_bin = shutil.which('networkctl', path=which_paths)
 resolvectl_bin = shutil.which('resolvectl', path=which_paths)
 timedatectl_bin = shutil.which('timedatectl', path=which_paths)
 udevadm_bin = shutil.which('udevadm', path=which_paths)
-systemd_udev_rules_build_dir = None
+test_ndisc_send = None
+build_dir = None
+source_dir = None
 
 use_valgrind = False
 valgrind_cmd = ''
@@ -283,9 +283,6 @@ def compare_kernel_version(min_kernel_version):
 
     return version.parse(kver) >= version.parse(min_kernel_version)
 
-def udev_reload():
-    check_output(*udevadm_cmd, 'control', '--reload')
-
 def copy_network_unit(*units, copy_dropins=True):
     """
     Copy networkd unit files into the testbed.
@@ -316,7 +313,7 @@ def copy_network_unit(*units, copy_dropins=True):
             has_link = True
 
     if has_link:
-        udev_reload()
+        udevadm_reload()
 
 def copy_credential(src, target):
         mkdir_p(credstore_dir)
@@ -338,7 +335,7 @@ def remove_network_unit(*units):
             has_link = True
 
     if has_link:
-        udev_reload()
+        udevadm_reload()
 
 def clear_network_units():
     has_link = False
@@ -351,7 +348,7 @@ def clear_network_units():
     rm_rf(network_unit_dir)
 
     if has_link:
-        udev_reload()
+        udevadm_reload()
 
 def copy_networkd_conf_dropin(*dropins):
     """Copy networkd.conf dropin files into the testbed."""
@@ -368,12 +365,13 @@ def clear_networkd_conf_dropins():
     rm_rf(networkd_conf_dropin_dir)
 
 def setup_systemd_udev_rules():
-    if not systemd_udev_rules_build_dir:
+    if not build_dir:
         return
 
     mkdir_p(udev_rules_dir)
 
-    for path in [systemd_udev_rules_build_dir, os.path.join(systemd_source_dir, "rules.d")]:
+    for path in [build_dir, source_dir]:
+        path = os.path.join(path, "rules.d")
         print(f"Copying udev rules from {path} to {udev_rules_dir}")
 
         for rule in os.listdir(path):
@@ -381,6 +379,9 @@ def setup_systemd_udev_rules():
                 continue
             cp(os.path.join(path, rule), udev_rules_dir)
 
+def clear_networkd_state_files():
+    rm_rf('/var/lib/systemd/network/')
+
 def copy_udev_rule(*rules):
     """Copy udev rules"""
     mkdir_p(udev_rules_dir)
@@ -415,11 +416,12 @@ def create_unit_dropin(unit, contents):
         f.write('\n'.join(contents))
 
 def create_service_dropin(service, command, additional_settings=None):
-    drop_in = [
-        '[Service]',
-        'ExecStart=',
-        f'ExecStart=!!{valgrind_cmd}{command}',
-    ]
+    drop_in = ['[Service]']
+    if command:
+        drop_in += [
+            'ExecStart=',
+            f'ExecStart=!!{valgrind_cmd}{command}',
+        ]
     if enable_debug:
         drop_in += ['Environment=SYSTEMD_LOG_LEVEL=debug']
     if asan_options:
@@ -447,6 +449,87 @@ def create_service_dropin(service, command, additional_settings=None):
 
     create_unit_dropin(f'{service}.service', drop_in)
 
+def setup_system_units():
+    if build_dir:
+        mkdir_p('/run/systemd/system/')
+
+        for unit in [
+                'systemd-networkd.service',
+                'systemd-networkd.socket',
+                'systemd-networkd-persistent-storage.service',
+                'systemd-resolved.service',
+                'systemd-timesyncd.service',
+                'systemd-udevd.service',
+        ]:
+            for path in [build_dir, source_dir]:
+                fullpath = os.path.join(os.path.join(path, "units"), unit)
+                if os.path.exists(fullpath):
+                    print(f"Copying unit file from {fullpath} to /run/systemd/system/")
+                    cp(fullpath, '/run/systemd/system/')
+                    break
+
+    create_service_dropin('systemd-networkd', networkd_bin,
+                          ['[Service]',
+                           'Restart=no',
+                           'Environment=SYSTEMD_NETWORK_TEST_MODE=yes',
+                           '[Unit]',
+                           'StartLimitIntervalSec=0'])
+    create_service_dropin('systemd-resolved', resolved_bin)
+    create_service_dropin('systemd-timesyncd', timesyncd_bin)
+
+    # TODO: also run udevd with sanitizers, valgrind, or coverage
+    create_unit_dropin(
+        'systemd-udevd.service',
+        [
+            '[Service]',
+            'ExecStart=',
+            f'ExecStart=!!@{udevadm_bin} systemd-udevd',
+        ]
+    )
+    create_unit_dropin(
+        'systemd-networkd.socket',
+        [
+            '[Unit]',
+            'StartLimitIntervalSec=0',
+        ]
+    )
+    create_unit_dropin(
+        'systemd-networkd-persistent-storage.service',
+        [
+            '[Unit]',
+            'StartLimitIntervalSec=0',
+            '[Service]',
+            'ExecStart=',
+            f'ExecStart={networkctl_bin} persistent-storage yes',
+            'ExecStop=',
+            f'ExecStop={networkctl_bin} persistent-storage no'
+        ]
+    )
+
+    check_output('systemctl daemon-reload')
+    print(check_output('systemctl cat systemd-networkd.service'))
+    print(check_output('systemctl cat systemd-networkd-persistent-storage.service'))
+    print(check_output('systemctl cat systemd-resolved.service'))
+    print(check_output('systemctl cat systemd-timesyncd.service'))
+    print(check_output('systemctl cat systemd-udevd.service'))
+    check_output('systemctl restart systemd-resolved.service')
+    check_output('systemctl restart systemd-timesyncd.service')
+    check_output('systemctl restart systemd-udevd.service')
+
+def clear_system_units():
+    def rm_unit(name):
+        rm_f(f'/run/systemd/system/{name}')
+        rm_rf(f'/run/systemd/system/{name}.d')
+
+    rm_unit('systemd-networkd.service')
+    rm_unit('systemd-networkd.socket')
+    rm_unit('systemd-networkd-persistent-storage.service')
+    rm_unit('systemd-resolved.service')
+    rm_unit('systemd-timesyncd.service')
+    rm_unit('systemd-udevd.service')
+    check_output('systemctl daemon-reload')
+    check_output('systemctl restart systemd-udevd.service')
+
 def link_exists(link):
     return call_quiet(f'ip link show {link}') == 0
 
@@ -798,6 +881,15 @@ def resolvectl(*args):
 def timedatectl(*args):
     return check_output(*(timedatectl_cmd + list(args)), env=env)
 
+def udevadm(*args):
+    return check_output(*(udevadm_cmd + list(args)))
+
+def udevadm_reload():
+    udevadm('control', '--reload')
+
+def udevadm_trigger(*args, action='add'):
+    udevadm('trigger', '--settle', f'--action={action}', *args)
+
 def setup_common():
     print()
 
@@ -824,6 +916,7 @@ def tear_down_common():
     # 6. remove configs
     clear_network_units()
     clear_networkd_conf_dropins()
+    clear_networkd_state_files()
 
     # 7. flush settings
     flush_fou_ports()
@@ -837,6 +930,7 @@ def setUpModule():
 
     clear_network_units()
     clear_networkd_conf_dropins()
+    clear_networkd_state_files()
     clear_udev_rules()
 
     setup_systemd_udev_rules()
@@ -849,58 +943,18 @@ def setUpModule():
     save_routing_policy_rules()
     save_timezone()
 
-    create_service_dropin('systemd-networkd', networkd_bin,
-                          ['[Service]',
-                           'Restart=no',
-                           'Environment=SYSTEMD_NETWORK_TEST_MODE=yes',
-                           '[Unit]',
-                           'StartLimitIntervalSec=0'])
-    create_service_dropin('systemd-resolved', resolved_bin)
-    create_service_dropin('systemd-timesyncd', timesyncd_bin)
-
-    # TODO: also run udevd with sanitizers, valgrind, or coverage
-    #create_service_dropin('systemd-udevd', udevd_bin,
-    #                      f'{udevadm_bin} control --reload --timeout 0')
-    create_unit_dropin(
-        'systemd-udevd.service',
-        [
-            '[Service]',
-            'ExecStart=',
-            f'ExecStart=!!@{udevd_bin} systemd-udevd',
-        ]
-    )
-    create_unit_dropin(
-        'systemd-networkd.socket',
-        [
-            '[Unit]',
-            'StartLimitIntervalSec=0',
-        ]
-    )
-
-    check_output('systemctl daemon-reload')
-    print(check_output('systemctl cat systemd-networkd.service'))
-    print(check_output('systemctl cat systemd-resolved.service'))
-    print(check_output('systemctl cat systemd-timesyncd.service'))
-    print(check_output('systemctl cat systemd-udevd.service'))
-    check_output('systemctl restart systemd-resolved.service')
-    check_output('systemctl restart systemd-timesyncd.service')
-    check_output('systemctl restart systemd-udevd.service')
+    setup_system_units()
 
 def tearDownModule():
     rm_rf(networkd_ci_temp_dir)
     clear_udev_rules()
     clear_network_units()
     clear_networkd_conf_dropins()
+    clear_networkd_state_files()
 
     restore_timezone()
 
-    rm_rf('/run/systemd/system/systemd-networkd.service.d')
-    rm_rf('/run/systemd/system/systemd-networkd.socket.d')
-    rm_rf('/run/systemd/system/systemd-resolved.service.d')
-    rm_rf('/run/systemd/system/systemd-timesyncd.service.d')
-    rm_rf('/run/systemd/system/systemd-udevd.service.d')
-    check_output('systemctl daemon-reload')
-    check_output('systemctl restart systemd-udevd.service')
+    clear_system_units()
     restore_active_units()
 
 class Utilities():
@@ -996,7 +1050,7 @@ class Utilities():
             self.fail(f'Timed out waiting for {link} to reach state {operstate}/{setup_state}')
         return False
 
-    def wait_online(self, links_with_operstate, timeout='20s', bool_any=False, ipv4=False, ipv6=False, setup_state='configured', setup_timeout=5):
+    def wait_online(self, *links_with_operstate, timeout='20s', bool_any=False, ipv4=False, ipv6=False, setup_state='configured', setup_timeout=5):
         """Wait for the links to reach the specified operstate and/or setup state.
 
         This is similar to wait_operstate() but can be used for multiple links,
@@ -1037,7 +1091,9 @@ class Utilities():
                 for link in links_with_operstate:
                     name = link.split(':')[0]
                     if link_exists(name):
-                        networkctl_status(name)
+                        print(networkctl_status(name))
+                    else:
+                        print(f'Interface {name} not found.')
             raise
         if not bool_any and setup_state:
             for link in links_with_operstate:
@@ -1073,6 +1129,16 @@ class Utilities():
 
         self.assertRegex(output, route_regex)
 
+    def wait_route_dropped(self, link, route_regex, table='main', ipv='', timeout_sec=100):
+        for i in range(timeout_sec):
+            if i > 0:
+                time.sleep(1)
+            output = check_output(f'ip {ipv} route show dev {link} table {table}')
+            if not re.search(route_regex, output):
+                break
+
+        self.assertNotRegex(output, route_regex)
+
     def check_netlabel(self, interface, address, label='system_u:object_r:root_t:s0'):
         if not shutil.which('selinuxenabled'):
             print('## Checking NetLabel skipped: selinuxenabled command not found.')
@@ -1128,7 +1194,7 @@ class NetworkctlTests(unittest.TestCase, Utilities):
     def test_altname(self):
         copy_network_unit('26-netdev-link-local-addressing-yes.network', '12-dummy.netdev', '12-dummy.link')
         start_networkd()
-        self.wait_online(['dummy98:degraded'])
+        self.wait_online('dummy98:degraded')
 
         output = networkctl_status('dummy98')
         self.assertRegex(output, 'hogehogehogehogehogehoge')
@@ -1138,7 +1204,7 @@ class NetworkctlTests(unittest.TestCase, Utilities):
         copy_network_unit('26-netdev-link-local-addressing-yes.network',
                           '12-dummy.netdev', '12-dummy-rename-to-altname.link')
         start_networkd()
-        self.wait_online(['dummyalt:degraded'])
+        self.wait_online('dummyalt:degraded')
 
         output = networkctl_status('dummyalt')
         self.assertIn('hogehogehogehogehogehoge', output)
@@ -1147,7 +1213,7 @@ class NetworkctlTests(unittest.TestCase, Utilities):
     def test_reconfigure(self):
         copy_network_unit('25-address-static.network', '12-dummy.netdev', copy_dropins=False)
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('ip -4 address show dev dummy98')
         print(output)
@@ -1160,7 +1226,7 @@ class NetworkctlTests(unittest.TestCase, Utilities):
         check_output('ip address del 10.2.2.4/16 dev dummy98')
 
         networkctl_reconfigure('dummy98')
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('ip -4 address show dev dummy98')
         print(output)
@@ -1181,7 +1247,7 @@ class NetworkctlTests(unittest.TestCase, Utilities):
 
         copy_network_unit('25-address-static.network', copy_dropins=False)
         networkctl_reload()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('ip -4 address show dev dummy98')
         print(output)
@@ -1191,7 +1257,7 @@ class NetworkctlTests(unittest.TestCase, Utilities):
 
     def test_renew(self):
         def check():
-            self.wait_online(['veth99:routable', 'veth-peer:routable'])
+            self.wait_online('veth99:routable', 'veth-peer:routable')
             output = networkctl_status('veth99')
             print(output)
             self.assertRegex(output, r'Address: 192.168.5.[0-9]* \(DHCP4 via 192.168.5.1\)')
@@ -1213,16 +1279,16 @@ class NetworkctlTests(unittest.TestCase, Utilities):
     def test_up_down(self):
         copy_network_unit('25-address-static.network', '12-dummy.netdev', copy_dropins=False)
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         networkctl('down', 'dummy98')
-        self.wait_online(['dummy98:off'])
+        self.wait_online('dummy98:off')
         networkctl('up', 'dummy98')
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
         networkctl('down', 'dummy98', 'dummy98', 'dummy98')
-        self.wait_online(['dummy98:off'])
+        self.wait_online('dummy98:off')
         networkctl('up', 'dummy98', 'dummy98', 'dummy98')
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
     def test_reload(self):
         start_networkd()
@@ -1233,7 +1299,7 @@ class NetworkctlTests(unittest.TestCase, Utilities):
 
         copy_network_unit('11-dummy.network')
         networkctl_reload()
-        self.wait_online(['test1:degraded'])
+        self.wait_online('test1:degraded')
 
         remove_network_unit('11-dummy.network')
         networkctl_reload()
@@ -1251,7 +1317,7 @@ class NetworkctlTests(unittest.TestCase, Utilities):
         copy_network_unit('11-dummy.netdev', '11-dummy.network')
         start_networkd()
 
-        self.wait_online(['test1:degraded'])
+        self.wait_online('test1:degraded')
 
         output = networkctl('list')
         self.assertRegex(output, '1 lo ')
@@ -1277,7 +1343,7 @@ class NetworkctlTests(unittest.TestCase, Utilities):
         copy_network_unit('11-dummy-mtu.netdev', '11-dummy.network')
         start_networkd()
 
-        self.wait_online(['test1:degraded'])
+        self.wait_online('test1:degraded')
 
         output = networkctl_status('test1')
         self.assertRegex(output, 'MTU: 1600')
@@ -1285,7 +1351,7 @@ class NetworkctlTests(unittest.TestCase, Utilities):
     def test_type(self):
         copy_network_unit('11-dummy.netdev', '11-dummy.network')
         start_networkd()
-        self.wait_online(['test1:degraded'])
+        self.wait_online('test1:degraded')
 
         output = networkctl_status('test1')
         print(output)
@@ -1298,7 +1364,7 @@ class NetworkctlTests(unittest.TestCase, Utilities):
     def test_unit_file(self):
         copy_network_unit('11-test-unit-file.netdev', '11-test-unit-file.network', '11-test-unit-file.link')
         start_networkd()
-        self.wait_online(['test1:degraded'])
+        self.wait_online('test1:degraded')
 
         output = networkctl_status('test1')
         print(output)
@@ -1313,7 +1379,7 @@ class NetworkctlTests(unittest.TestCase, Utilities):
         # This test may be run on the system that has older udevd than 70f32a260b5ebb68c19ecadf5d69b3844896ba55 (v249).
         # In that case, the udev DB for the loopback network interface may already have ID_NET_LINK_FILE property.
         # Let's reprocess the interface and drop the property.
-        check_output(*udevadm_cmd, 'trigger', '--settle', '--action=add', '/sys/class/net/lo')
+        udevadm_trigger('/sys/class/net/lo')
         output = networkctl_status('lo')
         print(output)
         self.assertIn('Link File: n/a', output)
@@ -1324,7 +1390,7 @@ class NetworkctlTests(unittest.TestCase, Utilities):
                           '25-veth.netdev', '26-netdev-link-local-addressing-yes.network')
         start_networkd()
 
-        self.wait_online(['test1:degraded', 'veth99:degraded', 'veth-peer:degraded'])
+        self.wait_online('test1:degraded', 'veth99:degraded', 'veth-peer:degraded')
 
         networkctl('delete', 'test1', 'veth99')
         self.check_link_exists('test1', expected=False)
@@ -1352,7 +1418,7 @@ class NetworkdMatchTests(unittest.TestCase, Utilities):
                           '12-dummy-altname.link')
         start_networkd()
 
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
         output = networkctl_status('dummy98')
         self.assertIn('Network File: /run/systemd/network/12-dummy-match-mac-01.network', output)
         output = check_output('ip -4 address show dev dummy98')
@@ -1362,7 +1428,7 @@ class NetworkdMatchTests(unittest.TestCase, Utilities):
         check_output('ip link set dev dummy98 address 12:34:56:78:9a:02')
 
         self.wait_address('dummy98', '10.0.0.2/16', ipv='-4', timeout_sec=10)
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
         output = networkctl_status('dummy98')
         self.assertIn('Network File: /run/systemd/network/12-dummy-match-mac-02.network', output)
 
@@ -1370,23 +1436,23 @@ class NetworkdMatchTests(unittest.TestCase, Utilities):
         check_output('ip link set dev dummy98 name dummy98-1')
 
         self.wait_address('dummy98-1', '10.0.1.2/16', ipv='-4', timeout_sec=10)
-        self.wait_online(['dummy98-1:routable'])
+        self.wait_online('dummy98-1:routable')
         output = networkctl_status('dummy98-1')
         self.assertIn('Network File: /run/systemd/network/12-dummy-match-renamed.network', output)
 
         check_output('ip link set dev dummy98-1 down')
         check_output('ip link set dev dummy98-1 name dummy98-2')
-        check_output(*udevadm_cmd, 'trigger', '--action=add', '/sys/class/net/dummy98-2')
+        udevadm_trigger('/sys/class/net/dummy98-2')
 
         self.wait_address('dummy98-2', '10.0.2.2/16', ipv='-4', timeout_sec=10)
-        self.wait_online(['dummy98-2:routable'])
+        self.wait_online('dummy98-2:routable')
         output = networkctl_status('dummy98-2')
         self.assertIn('Network File: /run/systemd/network/12-dummy-match-altname.network', output)
 
     def test_match_udev_property(self):
         copy_network_unit('12-dummy.netdev', '13-not-match-udev-property.network', '14-match-udev-property.network')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = networkctl_status('dummy98')
         print(output)
@@ -1404,7 +1470,7 @@ class WaitOnlineTests(unittest.TestCase, Utilities):
         copy_network_unit('25-bridge.netdev', '25-bridge.network', '11-dummy.netdev', '11-dummy.network')
         start_networkd()
 
-        self.wait_online(['bridge99', 'test1:degraded'], bool_any=True)
+        self.wait_online('bridge99', 'test1:degraded', bool_any=True)
 
         self.wait_operstate('bridge99', '(off|no-carrier)', setup_state='configuring')
         self.wait_operstate('test1', 'degraded')
@@ -1421,7 +1487,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
         copy_network_unit('10-dropin-test.netdev', '15-name-conflict-test.netdev')
         start_networkd()
 
-        self.wait_online(['dropin-test:off'], setup_state='unmanaged')
+        self.wait_online('dropin-test:off', setup_state='unmanaged')
 
         output = check_output('ip link show dropin-test')
         print(output)
@@ -1432,7 +1498,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
         copy_network_unit('25-bareudp.netdev', '26-netdev-link-local-addressing-yes.network')
         start_networkd()
 
-        self.wait_online(['bareudp99:degraded'])
+        self.wait_online('bareudp99:degraded')
 
         output = check_output('ip -d link show bareudp99')
         print(output)
@@ -1444,7 +1510,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
         copy_network_unit('25-batadv.netdev', '26-netdev-link-local-addressing-yes.network')
         start_networkd()
 
-        self.wait_online(['batadv99:degraded'])
+        self.wait_online('batadv99:degraded')
 
         output = check_output('ip -d link show batadv99')
         print(output)
@@ -1454,7 +1520,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
         copy_network_unit('25-bridge.netdev', '25-bridge-configure-without-carrier.network')
         start_networkd()
 
-        self.wait_online(['bridge99:no-carrier'])
+        self.wait_online('bridge99:no-carrier')
 
         tick = os.sysconf('SC_CLK_TCK')
         self.assertEqual(9, round(float(read_link_attr('bridge99', 'bridge', 'hello_time')) / tick))
@@ -1480,10 +1546,10 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
         self.assertIn('vlan_default_pvid 9 ', output)
 
     def test_bond(self):
-        copy_network_unit('25-bond.netdev', '25-bond-balanced-tlb.netdev')
+        copy_network_unit('25-bond.netdev', '25-bond-balanced-tlb.netdev', '25-bond-property.netdev')
         start_networkd()
 
-        self.wait_online(['bond99:off', 'bond98:off'], setup_state='unmanaged')
+        self.wait_online('bond99:off', 'bond98:off', 'bond97:off', setup_state='unmanaged')
 
         self.check_link_attr('bond99', 'bonding', 'mode',              '802.3ad 4')
         self.check_link_attr('bond99', 'bonding', 'xmit_hash_policy',  'layer3+4 1')
@@ -1511,12 +1577,18 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
         print(output)
         self.assertIn('Mode: balance-tlb', output)
 
+        output = networkctl_status('bond97')
+        print(output)
+
+        self.check_link_attr('bond97', 'bonding', 'arp_missed_max',    '10')
+        self.check_link_attr('bond97', 'bonding', 'peer_notif_delay', '300000')
+
     def test_vlan(self):
         copy_network_unit('21-vlan.netdev', '11-dummy.netdev',
                           '21-vlan.network', '21-vlan-test1.network')
         start_networkd()
 
-        self.wait_online(['test1:degraded', 'vlan99:routable'])
+        self.wait_online('test1:degraded', 'vlan99:routable')
 
         output = check_output('ip -d link show test1')
         print(output)
@@ -1549,7 +1621,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
         copy_network_unit('21-bond-802.3ad.netdev', '21-bond-802.3ad.network',
                           '21-vlan-on-bond.netdev', '21-vlan-on-bond.network')
         start_networkd()
-        self.wait_online(['bond99:off'])
+        self.wait_online('bond99:off')
         self.wait_operstate('vlan99', operstate='off', setup_state='configuring', setup_timeout=10)
 
         # The commit b05e52000b4eee764b383cc3031da0a3739e996e adds ", ignoring". To make it easily confirmed
@@ -1565,7 +1637,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
 
         copy_network_unit('11-dummy.netdev', '12-dummy.netdev', '21-dummy-bond-slave.network')
         networkctl_reload()
-        self.wait_online(['test1:enslaved', 'dummy98:enslaved', 'bond99:carrier', 'vlan99:routable'])
+        self.wait_online('test1:enslaved', 'dummy98:enslaved', 'bond99:carrier', 'vlan99:routable')
 
     def test_macvtap(self):
         first = True
@@ -1583,8 +1655,8 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                     f.write('[MACVTAP]\nMode=' + mode)
                 start_networkd()
 
-                self.wait_online(['macvtap99:degraded',
-                                  'test1:carrier' if mode == 'passthru' else 'test1:degraded'])
+                self.wait_online('macvtap99:degraded',
+                                 'test1:carrier' if mode == 'passthru' else 'test1:degraded')
 
                 output = check_output('ip -d link show macvtap99')
                 print(output)
@@ -1606,33 +1678,35 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                     f.write('[MACVLAN]\nMode=' + mode)
                 start_networkd()
 
-                self.wait_online(['macvlan99:degraded',
-                                  'test1:carrier' if mode == 'passthru' else 'test1:degraded'])
+                self.wait_online('macvlan99:degraded',
+                                 'test1:carrier' if mode == 'passthru' else 'test1:degraded')
 
                 output = check_output('ip -d link show test1')
                 print(output)
-                self.assertRegex(output, ' mtu 2000 ')
+                self.assertIn(' mtu 2000 ', output)
 
                 output = check_output('ip -d link show macvlan99')
                 print(output)
-                self.assertRegex(output, ' mtu 2000 ')
-                self.assertRegex(output, 'macvlan mode ' + mode + ' ')
+                self.assertIn(' mtu 2000 ', output)
+                self.assertIn(f' macvlan mode {mode} ', output)
 
                 remove_link('test1')
                 time.sleep(1)
 
                 check_output("ip link add test1 type dummy")
-                self.wait_online(['macvlan99:degraded',
-                                  'test1:carrier' if mode == 'passthru' else 'test1:degraded'])
+                self.wait_online('macvlan99:degraded',
+                                 'test1:carrier' if mode == 'passthru' else 'test1:degraded')
 
                 output = check_output('ip -d link show test1')
                 print(output)
-                self.assertRegex(output, ' mtu 2000 ')
+                self.assertIn(' mtu 2000 ', output)
 
                 output = check_output('ip -d link show macvlan99')
                 print(output)
-                self.assertRegex(output, ' mtu 2000 ')
-                self.assertRegex(output, 'macvlan mode ' + mode + ' ')
+                self.assertIn(' mtu 2000 ', output)
+                self.assertIn(f' macvlan mode {mode} ', output)
+                self.assertIn(' bcqueuelen 1234 ', output)
+                self.assertIn(' bclim 2147483647 ', output)
 
     @expectedFailureIfModuleIsNotAvailable('ipvlan')
     def test_ipvlan(self):
@@ -1651,7 +1725,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                     f.write('[IPVLAN]\nMode=' + mode + '\nFlags=' + flag)
 
                 start_networkd()
-                self.wait_online(['ipvlan99:degraded', 'test1:degraded'])
+                self.wait_online('ipvlan99:degraded', 'test1:degraded')
 
                 output = check_output('ip -d link show ipvlan99')
                 print(output)
@@ -1674,7 +1748,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                     f.write('[IPVTAP]\nMode=' + mode + '\nFlags=' + flag)
 
                 start_networkd()
-                self.wait_online(['ipvtap99:degraded', 'test1:degraded'])
+                self.wait_online('ipvtap99:degraded', 'test1:degraded')
 
                 output = check_output('ip -d link show ipvtap99')
                 print(output)
@@ -1685,7 +1759,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                           '25-veth-mtu.netdev')
         start_networkd()
 
-        self.wait_online(['veth99:degraded', 'veth-peer:degraded', 'veth-mtu:degraded', 'veth-mtu-peer:degraded'])
+        self.wait_online('veth99:degraded', 'veth-peer:degraded', 'veth-mtu:degraded', 'veth-mtu-peer:degraded')
 
         output = check_output('ip -d link show veth99')
         print(output)
@@ -1707,7 +1781,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
         copy_network_unit('25-tun.netdev', '25-tap.netdev', '26-netdev-link-local-addressing-yes.network')
         start_networkd()
 
-        self.wait_online(['testtun99:degraded', 'testtap99:degraded'])
+        self.wait_online('testtun99:degraded', 'testtap99:degraded')
 
         pid = networkd_pid()
         name = psutil.Process(pid).name()[:15]
@@ -1731,7 +1805,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
         remove_network_unit('26-netdev-link-local-addressing-yes.network')
 
         restart_networkd()
-        self.wait_online(['testtun99:degraded', 'testtap99:degraded'], setup_state='unmanaged')
+        self.wait_online('testtun99:degraded', 'testtap99:degraded', setup_state='unmanaged')
 
         pid = networkd_pid()
         name = psutil.Process(pid).name()[:15]
@@ -1753,7 +1827,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
 
         clear_network_units()
         restart_networkd()
-        self.wait_online(['testtun99:off', 'testtap99:off'], setup_state='unmanaged')
+        self.wait_online('testtun99:off', 'testtap99:off', setup_state='unmanaged')
 
         output = check_output('ip -d tuntap show')
         print(output)
@@ -1787,7 +1861,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
         copy_network_unit('25-vrf.netdev', '26-netdev-link-local-addressing-yes.network')
         start_networkd()
 
-        self.wait_online(['vrf99:carrier'])
+        self.wait_online('vrf99:carrier')
 
     @expectedFailureIfModuleIsNotAvailable('vcan')
     def test_vcan(self):
@@ -1795,9 +1869,9 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                           '25-vcan98.netdev', '25-vcan98.network')
         start_networkd()
 
-        self.wait_online(['vcan99:carrier', 'vcan98:carrier'])
+        self.wait_online('vcan99:carrier', 'vcan98:carrier')
         # For can devices, 'carrier' is the default required operational state.
-        self.wait_online(['vcan99', 'vcan98'])
+        self.wait_online('vcan99', 'vcan98')
 
         # https://github.com/systemd/systemd/issues/30140
         output = check_output('ip -d link show vcan99')
@@ -1813,9 +1887,9 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
         copy_network_unit('25-vxcan.netdev', '26-netdev-link-local-addressing-yes.network')
         start_networkd()
 
-        self.wait_online(['vxcan99:carrier', 'vxcan-peer:carrier'])
+        self.wait_online('vxcan99:carrier', 'vxcan-peer:carrier')
         # For can devices, 'carrier' is the default required operational state.
-        self.wait_online(['vxcan99', 'vxcan-peer'])
+        self.wait_online('vxcan99', 'vxcan-peer')
 
     @expectedFailureIfModuleIsNotAvailable('wireguard')
     def test_wireguard(self):
@@ -1828,7 +1902,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                           '25-wireguard-preshared-key.txt', '25-wireguard-private-key.txt',
                           '25-wireguard-no-peer.netdev', '25-wireguard-no-peer.network')
         start_networkd()
-        self.wait_online(['wg99:routable', 'wg98:routable', 'wg97:carrier'])
+        self.wait_online('wg99:routable', 'wg98:routable', 'wg97:carrier')
 
         output = check_output('ip -4 address show dev wg99')
         print(output)
@@ -1949,7 +2023,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
         copy_network_unit('25-geneve.netdev', '26-netdev-link-local-addressing-yes.network')
         start_networkd()
 
-        self.wait_online(['geneve99:degraded'])
+        self.wait_online('geneve99:degraded')
 
         output = check_output('ip -d link show geneve99')
         print(output)
@@ -1965,7 +2039,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                           '25-ipip-tunnel-remote-any.netdev', '25-tunnel-remote-any.network',
                           '25-ipip-tunnel-any-any.netdev', '25-tunnel-any-any.network')
         start_networkd()
-        self.wait_online(['ipiptun99:routable', 'ipiptun98:routable', 'ipiptun97:routable', 'ipiptun96:routable', 'dummy98:degraded'])
+        self.wait_online('ipiptun99:routable', 'ipiptun98:routable', 'ipiptun97:routable', 'ipiptun96:routable', 'dummy98:degraded')
 
         output = check_output('ip -d link show ipiptun99')
         print(output)
@@ -1987,7 +2061,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                           '25-gre-tunnel-remote-any.netdev', '25-tunnel-remote-any.network',
                           '25-gre-tunnel-any-any.netdev', '25-tunnel-any-any.network')
         start_networkd()
-        self.wait_online(['gretun99:routable', 'gretun98:routable', 'gretun97:routable', 'gretun96:routable', 'dummy98:degraded'])
+        self.wait_online('gretun99:routable', 'gretun98:routable', 'gretun97:routable', 'gretun96:routable', 'dummy98:degraded')
 
         output = check_output('ip -d link show gretun99')
         print(output)
@@ -2048,7 +2122,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                           '25-gretap-tunnel.netdev', '25-tunnel.network',
                           '25-gretap-tunnel-local-any.netdev', '25-tunnel-local-any.network')
         start_networkd()
-        self.wait_online(['gretap99:routable', 'gretap98:routable', 'dummy98:degraded'])
+        self.wait_online('gretap99:routable', 'gretap98:routable', 'dummy98:degraded')
 
         output = check_output('ip -d link show gretap99')
         print(output)
@@ -2072,7 +2146,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                           '25-ip6gretap-tunnel.netdev', '25-tunnel.network',
                           '25-ip6gretap-tunnel-local-any.netdev', '25-tunnel-local-any.network')
         start_networkd()
-        self.wait_online(['ip6gretap99:routable', 'ip6gretap98:routable', 'dummy98:degraded'])
+        self.wait_online('ip6gretap99:routable', 'ip6gretap98:routable', 'dummy98:degraded')
 
         output = check_output('ip -d link show ip6gretap99')
         print(output)
@@ -2088,7 +2162,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                           '25-vti-tunnel-remote-any.netdev', '25-tunnel-remote-any.network',
                           '25-vti-tunnel-any-any.netdev', '25-tunnel-any-any.network')
         start_networkd()
-        self.wait_online(['vtitun99:routable', 'vtitun98:routable', 'vtitun97:routable', 'vtitun96:routable', 'dummy98:degraded'])
+        self.wait_online('vtitun99:routable', 'vtitun98:routable', 'vtitun97:routable', 'vtitun96:routable', 'dummy98:degraded')
 
         output = check_output('ip -d link show vtitun99')
         print(output)
@@ -2109,7 +2183,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                           '25-vti6-tunnel-local-any.netdev', '25-tunnel-local-any.network',
                           '25-vti6-tunnel-remote-any.netdev', '25-tunnel-remote-any.network')
         start_networkd()
-        self.wait_online(['vti6tun99:routable', 'vti6tun98:routable', 'vti6tun97:routable', 'dummy98:degraded'])
+        self.wait_online('vti6tun99:routable', 'vti6tun98:routable', 'vti6tun97:routable', 'dummy98:degraded')
 
         output = check_output('ip -d link show vti6tun99')
         print(output)
@@ -2130,9 +2204,9 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                           '25-ip6tnl-tunnel-local-slaac.netdev', '25-ip6tnl-tunnel-local-slaac.network',
                           '25-ip6tnl-tunnel-external.netdev', '26-netdev-link-local-addressing-yes.network')
         start_networkd()
-        self.wait_online(['ip6tnl99:routable', 'ip6tnl98:routable', 'ip6tnl97:routable',
-                          'ip6tnl-slaac:degraded', 'ip6tnl-external:degraded',
-                          'dummy98:degraded', 'veth99:routable', 'veth-peer:degraded'])
+        self.wait_online('ip6tnl99:routable', 'ip6tnl98:routable', 'ip6tnl97:routable',
+                         'ip6tnl-slaac:degraded', 'ip6tnl-external:degraded',
+                         'dummy98:degraded', 'veth99:routable', 'veth-peer:degraded')
 
         output = check_output('ip -d link show ip6tnl99')
         print(output)
@@ -2166,7 +2240,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                           '25-sit-tunnel-remote-any.netdev', '25-tunnel-remote-any.network',
                           '25-sit-tunnel-any-any.netdev', '25-tunnel-any-any.network')
         start_networkd()
-        self.wait_online(['sittun99:routable', 'sittun98:routable', 'sittun97:routable', 'sittun96:routable', 'dummy98:degraded'])
+        self.wait_online('sittun99:routable', 'sittun98:routable', 'sittun97:routable', 'sittun96:routable', 'dummy98:degraded')
 
         output = check_output('ip -d link show sittun99')
         print(output)
@@ -2185,7 +2259,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
         copy_network_unit('12-dummy.netdev', '25-isatap.network',
                           '25-isatap-tunnel.netdev', '25-tunnel.network')
         start_networkd()
-        self.wait_online(['isataptun99:routable', 'dummy98:degraded'])
+        self.wait_online('isataptun99:routable', 'dummy98:degraded')
 
         output = check_output('ip -d link show isataptun99')
         print(output)
@@ -2195,7 +2269,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
         copy_network_unit('12-dummy.netdev', '25-6rd.network',
                           '25-6rd-tunnel.netdev', '25-tunnel.network')
         start_networkd()
-        self.wait_online(['sittun99:routable', 'dummy98:degraded'])
+        self.wait_online('sittun99:routable', 'dummy98:degraded')
 
         output = check_output('ip -d link show sittun99')
         print(output)
@@ -2207,7 +2281,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                           '25-erspan0-tunnel.netdev', '25-tunnel.network',
                           '25-erspan0-tunnel-local-any.netdev', '25-tunnel-local-any.network')
         start_networkd()
-        self.wait_online(['erspan99:routable', 'erspan98:routable', 'dummy98:degraded'])
+        self.wait_online('erspan99:routable', 'erspan98:routable', 'dummy98:degraded')
 
         output = check_output('ip -d link show erspan99')
         print(output)
@@ -2235,7 +2309,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                           '25-erspan1-tunnel.netdev', '25-tunnel.network',
                           '25-erspan1-tunnel-local-any.netdev', '25-tunnel-local-any.network')
         start_networkd()
-        self.wait_online(['erspan99:routable', 'erspan98:routable', 'dummy98:degraded'])
+        self.wait_online('erspan99:routable', 'erspan98:routable', 'dummy98:degraded')
 
         output = check_output('ip -d link show erspan99')
         print(output)
@@ -2266,7 +2340,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                           '25-erspan2-tunnel.netdev', '25-tunnel.network',
                           '25-erspan2-tunnel-local-any.netdev', '25-tunnel-local-any.network')
         start_networkd()
-        self.wait_online(['erspan99:routable', 'erspan98:routable', 'dummy98:degraded'])
+        self.wait_online('erspan99:routable', 'erspan98:routable', 'dummy98:degraded')
 
         output = check_output('ip -d link show erspan99')
         print(output)
@@ -2295,13 +2369,13 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
         copy_network_unit('25-ipip-tunnel-independent.netdev', '26-netdev-link-local-addressing-yes.network')
         start_networkd()
 
-        self.wait_online(['ipiptun99:carrier'])
+        self.wait_online('ipiptun99:carrier')
 
     def test_tunnel_independent_loopback(self):
         copy_network_unit('25-ipip-tunnel-independent-loopback.netdev', '26-netdev-link-local-addressing-yes.network')
         start_networkd()
 
-        self.wait_online(['ipiptun99:carrier'])
+        self.wait_online('ipiptun99:carrier')
 
     @expectedFailureIfModuleIsNotAvailable('xfrm_interface')
     def test_xfrm(self):
@@ -2310,7 +2384,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                           '26-netdev-link-local-addressing-yes.network')
         start_networkd()
 
-        self.wait_online(['dummy98:degraded', 'xfrm98:degraded', 'xfrm99:degraded'])
+        self.wait_online('dummy98:degraded', 'xfrm98:degraded', 'xfrm99:degraded')
 
         output = check_output('ip -d link show dev xfrm98')
         print(output)
@@ -2333,7 +2407,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                           '25-fou-gre.netdev', '25-fou-gretap.netdev')
         start_networkd()
 
-        self.wait_online(['ipiptun96:off', 'sittun96:off', 'gretun96:off', 'gretap96:off'], setup_state='unmanaged')
+        self.wait_online('ipiptun96:off', 'sittun96:off', 'gretun96:off', 'gretap96:off', setup_state='unmanaged')
 
         output = check_output('ip fou show')
         print(output)
@@ -2362,8 +2436,8 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                           '25-vxlan-local-slaac.netdev', '25-vxlan-local-slaac.network')
         start_networkd()
 
-        self.wait_online(['test1:degraded', 'veth99:routable', 'veth-peer:degraded',
-                          'vxlan99:degraded', 'vxlan98:degraded', 'vxlan97:degraded', 'vxlan-slaac:degraded'])
+        self.wait_online('test1:degraded', 'veth99:routable', 'veth-peer:degraded',
+                         'vxlan99:degraded', 'vxlan98:degraded', 'vxlan97:degraded', 'vxlan-slaac:degraded')
 
         output = check_output('ip -d -d link show vxlan99')
         print(output)
@@ -2414,7 +2488,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                           '26-macsec.network', '12-dummy.netdev')
         start_networkd()
 
-        self.wait_online(['dummy98:degraded', 'macsec99:routable'])
+        self.wait_online('dummy98:degraded', 'macsec99:routable')
 
         output = check_output('ip -d link show macsec99')
         print(output)
@@ -2441,14 +2515,119 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
         copy_network_unit('25-nlmon.netdev', '26-netdev-link-local-addressing-yes.network')
         start_networkd()
 
-        self.wait_online(['nlmon99:carrier'])
+        self.wait_online('nlmon99:carrier')
 
     @expectedFailureIfModuleIsNotAvailable('ifb')
     def test_ifb(self):
         copy_network_unit('25-ifb.netdev', '26-netdev-link-local-addressing-yes.network')
         start_networkd()
 
-        self.wait_online(['ifb99:degraded'])
+        self.wait_online('ifb99:degraded')
+
+    @unittest.skipUnless(os.cpu_count() >= 2, reason="CPU count should be >= 2 to pass this test")
+    def test_rps_cpu_1(self):
+        copy_network_unit('12-dummy.netdev', '12-dummy.network', '25-rps-cpu-1.link')
+        start_networkd()
+
+        self.wait_online('dummy98:carrier')
+
+        output = check_output('cat /sys/class/net/dummy98/queues/rx-0/rps_cpus')
+        print(output)
+        self.assertEqual(int(output.replace(',', ''), base=16), 2)
+
+    @unittest.skipUnless(os.cpu_count() >= 2, reason="CPU count should be >= 2 to pass this test")
+    def test_rps_cpu_0_1(self):
+        copy_network_unit('12-dummy.netdev', '12-dummy.network', '25-rps-cpu-0-1.link')
+        start_networkd()
+
+        self.wait_online('dummy98:carrier')
+
+        output = check_output('cat /sys/class/net/dummy98/queues/rx-0/rps_cpus')
+        print(output)
+        self.assertEqual(int(output.replace(',', ''), base=16), 3)
+
+    @unittest.skipUnless(os.cpu_count() >= 4, reason="CPU count should be >= 4 to pass this test")
+    def test_rps_cpu_multi(self):
+        copy_network_unit('12-dummy.netdev', '12-dummy.network', '25-rps-cpu-multi.link')
+        start_networkd()
+
+        self.wait_online('dummy98:carrier')
+
+        output = check_output('cat /sys/class/net/dummy98/queues/rx-0/rps_cpus')
+        print(output)
+        self.assertEqual(int(output.replace(',', ''), base=16), 15)
+
+    def test_rps_cpu(self):
+        cpu_count = os.cpu_count()
+
+        copy_network_unit('12-dummy.netdev', '12-dummy.network')
+        start_networkd()
+
+        self.wait_online('dummy98:carrier')
+
+        # 0
+        copy_network_unit('25-rps-cpu-0.link')
+        udevadm_trigger('/sys/class/net/dummy98')
+        output = check_output('cat /sys/class/net/dummy98/queues/rx-0/rps_cpus')
+        print(output)
+        self.assertEqual(int(output.replace(',', ''), base=16), 1)
+        remove_network_unit('25-rps-cpu-0.link')
+
+        # all
+        copy_network_unit('25-rps-cpu-all.link')
+        udevadm_trigger('/sys/class/net/dummy98')
+        output = check_output('cat /sys/class/net/dummy98/queues/rx-0/rps_cpus')
+        print(output)
+        self.assertEqual(f"{int(output.replace(',', ''), base=16):x}", f'{(1 << cpu_count) - 1:x}')
+        remove_network_unit('25-rps-cpu-all.link')
+
+        # disable
+        copy_network_unit('24-rps-cpu-disable.link')
+        udevadm_trigger('/sys/class/net/dummy98')
+        output = check_output('cat /sys/class/net/dummy98/queues/rx-0/rps_cpus')
+        print(output)
+        self.assertEqual(int(output.replace(',', ''), base=16), 0)
+        remove_network_unit('24-rps-cpu-disable.link')
+
+        # set all again
+        copy_network_unit('25-rps-cpu-all.link')
+        udevadm_trigger('/sys/class/net/dummy98')
+        output = check_output('cat /sys/class/net/dummy98/queues/rx-0/rps_cpus')
+        print(output)
+        self.assertEqual(f"{int(output.replace(',', ''), base=16):x}", f'{(1 << cpu_count) - 1:x}')
+        remove_network_unit('25-rps-cpu-all.link')
+
+        # empty -> unchanged
+        copy_network_unit('24-rps-cpu-empty.link')
+        udevadm_trigger('/sys/class/net/dummy98')
+        output = check_output('cat /sys/class/net/dummy98/queues/rx-0/rps_cpus')
+        print(output)
+        self.assertEqual(f"{int(output.replace(',', ''), base=16):x}", f'{(1 << cpu_count) - 1:x}')
+        remove_network_unit('24-rps-cpu-empty.link')
+
+        # 0, then empty -> unchanged
+        copy_network_unit('25-rps-cpu-0-empty.link')
+        udevadm_trigger('/sys/class/net/dummy98')
+        output = check_output('cat /sys/class/net/dummy98/queues/rx-0/rps_cpus')
+        print(output)
+        self.assertEqual(f"{int(output.replace(',', ''), base=16):x}", f'{(1 << cpu_count) - 1:x}')
+        remove_network_unit('25-rps-cpu-0-empty.link')
+
+        # 0, then invalid -> 0
+        copy_network_unit('25-rps-cpu-0-invalid.link')
+        udevadm_trigger('/sys/class/net/dummy98')
+        output = check_output('cat /sys/class/net/dummy98/queues/rx-0/rps_cpus')
+        print(output)
+        self.assertEqual(int(output.replace(',', ''), base=16), 1)
+        remove_network_unit('25-rps-cpu-0-invalid.link')
+
+        # invalid -> unchanged
+        copy_network_unit('24-rps-cpu-invalid.link')
+        udevadm_trigger('/sys/class/net/dummy98')
+        output = check_output('cat /sys/class/net/dummy98/queues/rx-0/rps_cpus')
+        print(output)
+        self.assertEqual(int(output.replace(',', ''), base=16), 1)
+        remove_network_unit('24-rps-cpu-invalid.link')
 
 class NetworkdL2TPTests(unittest.TestCase, Utilities):
 
@@ -2464,7 +2643,7 @@ class NetworkdL2TPTests(unittest.TestCase, Utilities):
                           '25-l2tp-udp.netdev', '25-l2tp.network')
         start_networkd()
 
-        self.wait_online(['test1:routable', 'l2tp-ses1:degraded', 'l2tp-ses2:degraded'])
+        self.wait_online('test1:routable', 'l2tp-ses1:degraded', 'l2tp-ses2:degraded')
 
         output = check_output('ip l2tp show tunnel tunnel_id 10')
         print(output)
@@ -2492,7 +2671,7 @@ class NetworkdL2TPTests(unittest.TestCase, Utilities):
                           '25-l2tp-ip.netdev', '25-l2tp.network')
         start_networkd()
 
-        self.wait_online(['test1:routable', 'l2tp-ses3:degraded', 'l2tp-ses4:degraded'])
+        self.wait_online('test1:routable', 'l2tp-ses3:degraded', 'l2tp-ses4:degraded')
 
         output = check_output('ip l2tp show tunnel tunnel_id 10')
         print(output)
@@ -2638,7 +2817,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         self.setup_nftset('ifindex', 'iface_index')
         start_networkd()
 
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         ip4_null_16 = None
         ip4_null_24 = None
@@ -2700,7 +2879,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
 
         copy_network_unit('25-address-static.network.d/10-override.conf')
         networkctl_reload()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
         self.verify_address_static(
             label1='new-label1',
             label2='dummy98',
@@ -2732,7 +2911,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         )
 
         networkctl_reconfigure('dummy98')
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
         self.verify_address_static(
             label1='new-label1',
             label2='dummy98',
@@ -2774,7 +2953,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
 
         # 2. reconfigure the interface, and check the deprecated flag is set again
         networkctl_reconfigure('dummy98')
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
         self.verify_address_static(
             label1='new-label1',
             label2='dummy98',
@@ -2808,14 +2987,14 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         # test for ENOBUFS issue #17012 (with reload)
         copy_network_unit('25-address-static.network.d/10-many-address.conf')
         networkctl_reload()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
         output = check_output('ip -4 address show dev dummy98')
         for i in range(1, 254):
             self.assertIn(f'inet 10.3.3.{i}/16 brd 10.3.255.255', output)
 
         # (with reconfigure)
         networkctl_reconfigure('dummy98')
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
         output = check_output('ip -4 address show dev dummy98')
         for i in range(1, 254):
             self.assertIn(f'inet 10.3.3.{i}/16 brd 10.3.255.255', output)
@@ -2823,7 +3002,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         # test for an empty string assignment for Address= in [Network]
         copy_network_unit('25-address-static.network.d/20-clear-addresses.conf')
         networkctl_reload()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
         output = check_output('ip -4 address show dev dummy98')
         for i in range(1, 254):
             self.assertNotIn(f'inet 10.3.3.{i}/16 brd 10.3.255.255', output)
@@ -2839,7 +3018,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
 
         copy_network_unit('25-address-ipv4acd-veth99.network', copy_dropins=False)
         start_networkd()
-        self.wait_online(['veth99:routable'])
+        self.wait_online('veth99:routable')
 
         output = check_output('ip -4 address show dev veth99')
         print(output)
@@ -2865,7 +3044,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
             else:
                 restart_networkd()
 
-            self.wait_online(['dummy98:routable'])
+            self.wait_online('dummy98:routable')
 
             output = check_output('ip -4 address show dev dummy98')
             self.assertIn('inet 100.64.0.1 peer 100.64.0.2/32 scope global', output)
@@ -2881,7 +3060,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
             else:
                 restart_networkd()
 
-            self.wait_online(['dummy98:routable', 'test1:routable', 'vrf99:carrier'])
+            self.wait_online('dummy98:routable', 'test1:routable', 'vrf99:carrier')
 
             output = check_output('ip route show table 42 dev dummy98')
             print('### ip route show table 42 dev dummy98')
@@ -2945,7 +3124,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
 
         copy_network_unit('25-test1.network.d/configure-without-carrier.conf', copy_dropins=False)
         restart_networkd()
-        self.wait_online(['test1:no-carrier'])
+        self.wait_online('test1:no-carrier')
 
         carrier_map = {'on': '1', 'off': '0'}
         routable_map = {'on': 'routable', 'off': 'no-carrier'}
@@ -2953,7 +3132,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
             with self.subTest(carrier=carrier):
                 if carrier_map[carrier] != read_link_attr('test1', 'carrier'):
                     check_output(f'ip link set dev test1 carrier {carrier}')
-                self.wait_online([f'test1:{routable_map[carrier]}:{routable_map[carrier]}'])
+                self.wait_online(f'test1:{routable_map[carrier]}:{routable_map[carrier]}')
 
                 output = networkctl_status('test1')
                 print(output)
@@ -2969,7 +3148,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
 
         copy_network_unit('25-test1.network')
         restart_networkd()
-        self.wait_online(['test1:no-carrier'])
+        self.wait_online('test1:no-carrier')
 
         carrier_map = {'on': '1', 'off': '0'}
         routable_map = {'on': 'routable', 'off': 'no-carrier'}
@@ -2977,7 +3156,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
             with self.subTest(carrier=carrier, have_config=have_config):
                 if carrier_map[carrier] != read_link_attr('test1', 'carrier'):
                     check_output(f'ip link set dev test1 carrier {carrier}')
-                self.wait_online([f'test1:{routable_map[carrier]}:{routable_map[carrier]}'])
+                self.wait_online(f'test1:{routable_map[carrier]}:{routable_map[carrier]}')
 
                 output = networkctl_status('test1')
                 print(output)
@@ -2992,7 +3171,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
     def test_routing_policy_rule(self):
         copy_network_unit('25-routing-policy-rule-test1.network', '11-dummy.netdev')
         start_networkd()
-        self.wait_online(['test1:degraded'])
+        self.wait_online('test1:degraded')
 
         output = check_output('ip rule list iif test1 priority 111')
         print(output)
@@ -3032,7 +3211,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
 
         for trial in range(3):
             restart_networkd(show_logs=(trial > 0))
-            self.wait_online(['test1:degraded', 'dummy98:degraded'])
+            self.wait_online('test1:degraded', 'dummy98:degraded')
 
             output = check_output('ip rule list table 7')
             print(output)
@@ -3045,7 +3224,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
     def test_routing_policy_rule_reconfigure(self):
         copy_network_unit('25-routing-policy-rule-reconfigure2.network', '11-dummy.netdev')
         start_networkd()
-        self.wait_online(['test1:degraded'])
+        self.wait_online('test1:degraded')
 
         output = check_output('ip rule list table 1011')
         print(output)
@@ -3060,7 +3239,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
 
         copy_network_unit('25-routing-policy-rule-reconfigure1.network', '11-dummy.netdev')
         networkctl_reload()
-        self.wait_online(['test1:degraded'])
+        self.wait_online('test1:degraded')
 
         output = check_output('ip rule list table 1011')
         print(output)
@@ -3089,7 +3268,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         self.assertEqual(output, '')
 
         networkctl_reconfigure('test1')
-        self.wait_online(['test1:degraded'])
+        self.wait_online('test1:degraded')
 
         output = check_output('ip rule list table 1011')
         print(output)
@@ -3106,7 +3285,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
     def test_routing_policy_rule_port_range(self):
         copy_network_unit('25-fibrule-port-range.network', '11-dummy.netdev')
         start_networkd()
-        self.wait_online(['test1:degraded'])
+        self.wait_online('test1:degraded')
 
         output = check_output('ip rule')
         print(output)
@@ -3121,7 +3300,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
     def test_routing_policy_rule_invert(self):
         copy_network_unit('25-fibrule-invert.network', '11-dummy.netdev')
         start_networkd()
-        self.wait_online(['test1:degraded'])
+        self.wait_online('test1:degraded')
 
         output = check_output('ip rule')
         print(output)
@@ -3134,7 +3313,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
     def test_routing_policy_rule_l3mdev(self):
         copy_network_unit('25-fibrule-l3mdev.network', '11-dummy.netdev')
         start_networkd()
-        self.wait_online(['test1:degraded'])
+        self.wait_online('test1:degraded')
 
         output = check_output('ip rule')
         print(output)
@@ -3145,7 +3324,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
     def test_routing_policy_rule_uidrange(self):
         copy_network_unit('25-fibrule-uidrange.network', '11-dummy.netdev')
         start_networkd()
-        self.wait_online(['test1:degraded'])
+        self.wait_online('test1:degraded')
 
         output = check_output('ip rule')
         print(output)
@@ -3161,7 +3340,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         copy_network_unit('25-route-static.network', '12-dummy.netdev',
                           '25-route-static-test1.network', '11-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = networkctl_status('dummy98')
         print(output)
@@ -3270,7 +3449,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
 
         copy_network_unit('25-address-static.network', copy_dropins=False)
         networkctl_reload()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         # check all routes managed by Manager are removed
         print('### ip -4 route show type blackhole')
@@ -3305,7 +3484,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
 
         remove_network_unit('25-address-static.network')
         networkctl_reload()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         # check all routes managed by Manager are reconfigured
         print('### ip -4 route show type blackhole')
@@ -3388,7 +3567,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
     def test_route_via_ipv6(self):
         copy_network_unit('25-route-via-ipv6.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = networkctl_status('dummy98')
         print(output)
@@ -3409,7 +3588,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
     def test_route_congctl(self):
         copy_network_unit('25-route-congctl.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         print('### ip -6 route show dev dummy98 2001:1234:5:8fff:ff:ff:ff:ff')
         output = check_output('ip -6 route show dev dummy98 2001:1234:5:8fff:ff:ff:ff:ff')
@@ -3429,7 +3608,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         copy_network_unit('25-route-vrf.network', '12-dummy.netdev',
                           '25-vrf.netdev', '25-vrf.network')
         start_networkd()
-        self.wait_online(['dummy98:routable', 'vrf99:carrier'])
+        self.wait_online('dummy98:routable', 'vrf99:carrier')
 
         output = check_output('ip route show vrf vrf99')
         print(output)
@@ -3442,7 +3621,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
     def test_gateway_reconfigure(self):
         copy_network_unit('25-gateway-static.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
         print('### ip -4 route show dev dummy98 default')
         output = check_output('ip -4 route show dev dummy98 default')
         print(output)
@@ -3452,7 +3631,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         remove_network_unit('25-gateway-static.network')
         copy_network_unit('25-gateway-next-static.network')
         networkctl_reload()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
         print('### ip -4 route show dev dummy98 default')
         output = check_output('ip -4 route show dev dummy98 default')
         print(output)
@@ -3465,7 +3644,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         # tentative state, and do our test on that
         copy_network_unit('23-active-slave.network', '25-route-ipv6-src.network', '25-bond-active-backup-slave.netdev', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:enslaved', 'bond199:routable'])
+        self.wait_online('dummy98:enslaved', 'bond199:routable')
 
         output = check_output('ip -6 route list dev bond199')
         print(output)
@@ -3480,7 +3659,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
             if i != 0:
                 networkctl_reconfigure('dummy98')
 
-            self.wait_online(['dummy98:routable'])
+            self.wait_online('dummy98:routable')
 
             output = check_output('ip -6 route list dev dummy98')
             print(output)
@@ -3489,7 +3668,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
     def test_ip_link_mac_address(self):
         copy_network_unit('25-address-link-section.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:degraded'])
+        self.wait_online('dummy98:degraded')
 
         output = check_output('ip link show dummy98')
         print(output)
@@ -3504,7 +3683,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
     def test_ipv6_address_label(self):
         copy_network_unit('25-ipv6-address-label-section.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:degraded'])
+        self.wait_online('dummy98:degraded')
 
         output = check_output('ip addrlabel list')
         print(output)
@@ -3514,7 +3693,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         copy_network_unit('25-ipv6-proxy-ndp.network', '12-dummy.netdev')
         start_networkd()
 
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('ip neighbor show proxy dev dummy98')
         print(output)
@@ -3526,48 +3705,48 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         copy_network_unit('25-dummy.netdev', '25-dummy.network')
         start_networkd()
 
-        self.wait_online([f'{link}:degraded'])
+        self.wait_online(f'{link}:degraded')
         remove_network_unit('25-dummy.network')
 
         # expect retrans_time_ms updated
         copy_network_unit('25-ipv6-neigh-retrans-time-3s.network')
         networkctl_reload()
-        self.wait_online([f'{link}:degraded'])
+        self.wait_online(f'{link}:degraded')
         self.check_ipv6_neigh_sysctl_attr(link, 'retrans_time_ms', '3000')
         remove_network_unit('25-ipv6-neigh-retrans-time-3s.network')
 
         # expect retrans_time_ms unchanged
         copy_network_unit('25-ipv6-neigh-retrans-time-0s.network')
         networkctl_reload()
-        self.wait_online([f'{link}:degraded'])
+        self.wait_online(f'{link}:degraded')
         self.check_ipv6_neigh_sysctl_attr(link, 'retrans_time_ms', '3000')
         remove_network_unit('25-ipv6-neigh-retrans-time-0s.network')
 
         # expect retrans_time_ms unchanged
         copy_network_unit('25-ipv6-neigh-retrans-time-toobig.network')
         networkctl_reload()
-        self.wait_online([f'{link}:degraded'])
+        self.wait_online(f'{link}:degraded')
         self.check_ipv6_neigh_sysctl_attr(link, 'retrans_time_ms', '3000')
         remove_network_unit('25-ipv6-neigh-retrans-time-toobig.network')
 
         # expect retrans_time_ms unchanged
         copy_network_unit('25-ipv6-neigh-retrans-time-infinity.network')
         networkctl_reload()
-        self.wait_online([f'{link}:degraded'])
+        self.wait_online(f'{link}:degraded')
         self.check_ipv6_neigh_sysctl_attr(link, 'retrans_time_ms', '3000')
         remove_network_unit('25-ipv6-neigh-retrans-time-infinity.network')
 
         # expect retrans_time_ms unchanged
         copy_network_unit('25-ipv6-neigh-retrans-time-invalid.network')
         networkctl_reload()
-        self.wait_online([f'{link}:degraded'])
+        self.wait_online(f'{link}:degraded')
         self.check_ipv6_neigh_sysctl_attr(link, 'retrans_time_ms', '3000')
         remove_network_unit('25-ipv6-neigh-retrans-time-invalid.network')
 
         # expect retrans_time_ms updated
         copy_network_unit('25-ipv6-neigh-retrans-time-4s.network')
         networkctl_reload()
-        self.wait_online([f'{link}:degraded'])
+        self.wait_online(f'{link}:degraded')
         self.check_ipv6_neigh_sysctl_attr(link, 'retrans_time_ms', '4000')
         remove_network_unit('25-ipv6-neigh-retrans-time-4s.network')
 
@@ -3577,7 +3756,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
                           '25-ip6gre-tunnel-remote-any.netdev', '25-neighbor-ipv6.network',
                           copy_dropins=False)
         start_networkd()
-        self.wait_online(['dummy98:degraded', 'gretun97:routable', 'ip6gretun97:routable'])
+        self.wait_online('dummy98:degraded', 'gretun97:routable', 'ip6gretun97:routable')
 
         print('### ip neigh list dev gretun97')
         output = check_output('ip neigh list dev gretun97')
@@ -3606,7 +3785,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         # the valid configurations in 10-step1.conf.
         copy_network_unit('25-neighbor-dummy.network.d/10-step2.conf')
         networkctl_reload()
-        self.wait_online(['dummy98:degraded'])
+        self.wait_online('dummy98:degraded')
 
         print('### ip neigh list dev dummy98')
         output = check_output('ip neigh list dev dummy98')
@@ -3623,7 +3802,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
                             '25-neighbor-dummy.network.d/10-step2.conf')
         copy_network_unit('25-neighbor-dummy.network.d/10-step3.conf')
         networkctl_reload()
-        self.wait_online(['dummy98:degraded'])
+        self.wait_online('dummy98:degraded')
 
         print('### ip neigh list dev dummy98')
         output = check_output('ip neigh list dev dummy98')
@@ -3638,7 +3817,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         copy_network_unit('25-link-local-addressing-yes.network', '11-dummy.netdev',
                           '25-link-local-addressing-no.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['test1:degraded', 'dummy98:carrier'])
+        self.wait_online('test1:degraded', 'dummy98:carrier')
 
         output = check_output('ip address show dev test1')
         print(output)
@@ -3668,7 +3847,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
     def test_link_local_addressing_ipv6ll(self):
         copy_network_unit('26-link-local-addressing-ipv6.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:degraded'])
+        self.wait_online('dummy98:degraded')
 
         # An IPv6LL address exists by default.
         output = check_output('ip address show dev dummy98')
@@ -3677,7 +3856,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
 
         copy_network_unit('25-link-local-addressing-no.network')
         networkctl_reload()
-        self.wait_online(['dummy98:carrier'])
+        self.wait_online('dummy98:carrier')
 
         # Check if the IPv6LL address is removed.
         output = check_output('ip address show dev dummy98')
@@ -3686,7 +3865,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
 
         remove_network_unit('25-link-local-addressing-no.network')
         networkctl_reload()
-        self.wait_online(['dummy98:degraded'])
+        self.wait_online('dummy98:degraded')
 
         # Check if a new IPv6LL address is assigned.
         output = check_output('ip address show dev dummy98')
@@ -3697,7 +3876,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         copy_networkd_conf_dropin('25-global-ipv6-privacy-extensions.conf')
         copy_network_unit('25-sysctl.network', '12-dummy.netdev', copy_dropins=False)
         start_networkd()
-        self.wait_online(['dummy98:degraded'])
+        self.wait_online('dummy98:degraded')
 
         self.check_ipv6_sysctl_attr('dummy98', 'forwarding', '1')
         self.check_ipv6_sysctl_attr('dummy98', 'use_tempaddr', '1')
@@ -3712,7 +3891,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
 
         copy_network_unit('25-sysctl.network.d/25-ipv6-privacy-extensions.conf')
         networkctl_reload()
-        self.wait_online(['dummy98:degraded'])
+        self.wait_online('dummy98:degraded')
 
         self.check_ipv6_sysctl_attr('dummy98', 'use_tempaddr', '2')
 
@@ -3724,7 +3903,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         check_output('sysctl net.ipv6.conf.default.disable_ipv6=1')
 
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('ip -4 address show dummy98')
         print(output)
@@ -3748,7 +3927,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         check_output('sysctl net.ipv6.conf.default.disable_ipv6=0')
 
         restart_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('ip -4 address show dummy98')
         print(output)
@@ -3779,7 +3958,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         # add one bound interface. The interface will be up.
         check_output('ip link add dummy98 type dummy')
         check_output('ip link set dummy98 up')
-        self.wait_online(['test1:routable'])
+        self.wait_online('test1:routable')
         output = check_output('ip address show test1')
         print(output)
         self.assertIn('UP,LOWER_UP', output)
@@ -3813,7 +3992,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
 
         # bring up the bound interface. The interface will be up.
         check_output('ip link set dummy99 up')
-        self.wait_online(['test1:routable'])
+        self.wait_online('test1:routable')
         output = check_output('ip address show test1')
         print(output)
         self.assertIn('UP,LOWER_UP', output)
@@ -3832,7 +4011,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         # re-add one bound interface. The interface will be up.
         check_output('ip link add dummy98 type dummy')
         check_output('ip link set dummy98 up')
-        self.wait_online(['test1:routable'])
+        self.wait_online('test1:routable')
         output = check_output('ip address show test1')
         print(output)
         self.assertIn('UP,LOWER_UP', output)
@@ -3906,7 +4085,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         if policy.endswith('down') or policy == 'manual':
             self.wait_operstate('test1', 'off', setup_state='configuring')
         else:
-            self.wait_online(['test1'])
+            self.wait_online('test1')
 
         if policy == 'always-down':
             # if always-down, required for online is forced to no
@@ -3944,7 +4123,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
     def test_domain(self):
         copy_network_unit('12-dummy.netdev', '24-search-domain.network')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = networkctl_status('dummy98')
         print(output)
@@ -3965,7 +4144,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
 
         copy_network_unit('24-keep-configuration-static.network')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('ip address show dummy98')
         print(output)
@@ -3973,7 +4152,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         self.assertNotRegex(output, 'inet 10.2.3.4/16 scope global dynamic dummy98')
 
     def check_nexthop(self, manage_foreign_nexthops, first):
-        self.wait_online(['veth99:routable', 'veth-peer:routable', 'dummy98:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable', 'dummy98:routable')
 
         output = check_output('ip nexthop list dev veth99')
         print(output)
@@ -4104,7 +4283,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         remove_network_unit('25-nexthop-2.network')
         copy_network_unit('25-nexthop-nothing.network')
         networkctl_reload()
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
 
         output = check_output('ip nexthop list dev veth99')
         print(output)
@@ -4146,7 +4325,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         # Reconfigure the interface that has nexthop with ID 20 and 21,
         # then the route requested by test1 can be configured.
         networkctl_reconfigure('dummy98')
-        self.wait_online(['test1:routable'])
+        self.wait_online('test1:routable')
 
         # Check if the requested route actually configured.
         output = check_output('ip route show 10.10.11.10')
@@ -4187,7 +4366,7 @@ class NetworkdTCTests(unittest.TestCase, Utilities):
     def test_qdisc_cake(self):
         copy_network_unit('25-qdisc-cake.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('tc qdisc show dev dummy98')
         print(output)
@@ -4211,7 +4390,7 @@ class NetworkdTCTests(unittest.TestCase, Utilities):
     def test_qdisc_codel(self):
         copy_network_unit('25-qdisc-codel.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('tc qdisc show dev dummy98')
         print(output)
@@ -4222,7 +4401,7 @@ class NetworkdTCTests(unittest.TestCase, Utilities):
     def test_qdisc_drr(self):
         copy_network_unit('25-qdisc-drr.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('tc qdisc show dev dummy98')
         print(output)
@@ -4235,7 +4414,7 @@ class NetworkdTCTests(unittest.TestCase, Utilities):
     def test_qdisc_ets(self):
         copy_network_unit('25-qdisc-ets.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('tc qdisc show dev dummy98')
         print(output)
@@ -4249,7 +4428,7 @@ class NetworkdTCTests(unittest.TestCase, Utilities):
     def test_qdisc_fq(self):
         copy_network_unit('25-qdisc-fq.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('tc qdisc show dev dummy98')
         print(output)
@@ -4263,7 +4442,7 @@ class NetworkdTCTests(unittest.TestCase, Utilities):
     def test_qdisc_fq_codel(self):
         copy_network_unit('25-qdisc-fq_codel.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('tc qdisc show dev dummy98')
         print(output)
@@ -4274,7 +4453,7 @@ class NetworkdTCTests(unittest.TestCase, Utilities):
     def test_qdisc_fq_pie(self):
         copy_network_unit('25-qdisc-fq_pie.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('tc qdisc show dev dummy98')
         print(output)
@@ -4286,7 +4465,7 @@ class NetworkdTCTests(unittest.TestCase, Utilities):
     def test_qdisc_gred(self):
         copy_network_unit('25-qdisc-gred.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('tc qdisc show dev dummy98')
         print(output)
@@ -4297,7 +4476,7 @@ class NetworkdTCTests(unittest.TestCase, Utilities):
     def test_qdisc_hhf(self):
         copy_network_unit('25-qdisc-hhf.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('tc qdisc show dev dummy98')
         print(output)
@@ -4308,7 +4487,7 @@ class NetworkdTCTests(unittest.TestCase, Utilities):
     def test_qdisc_htb_fifo(self):
         copy_network_unit('25-qdisc-htb-fifo.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('tc qdisc show dev dummy98')
         print(output)
@@ -4345,7 +4524,7 @@ class NetworkdTCTests(unittest.TestCase, Utilities):
         copy_network_unit('25-qdisc-clsact.network', '12-dummy.netdev',
                           '25-qdisc-ingress.network', '11-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable', 'test1:routable'])
+        self.wait_online('dummy98:routable', 'test1:routable')
 
         output = check_output('tc qdisc show dev dummy98')
         print(output)
@@ -4360,7 +4539,7 @@ class NetworkdTCTests(unittest.TestCase, Utilities):
         copy_network_unit('25-qdisc-netem.network', '12-dummy.netdev',
                           '25-qdisc-netem-compat.network', '11-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable', 'test1:routable'])
+        self.wait_online('dummy98:routable', 'test1:routable')
 
         output = check_output('tc qdisc show dev dummy98')
         print(output)
@@ -4376,7 +4555,7 @@ class NetworkdTCTests(unittest.TestCase, Utilities):
     def test_qdisc_pie(self):
         copy_network_unit('25-qdisc-pie.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('tc qdisc show dev dummy98')
         print(output)
@@ -4387,7 +4566,7 @@ class NetworkdTCTests(unittest.TestCase, Utilities):
     def test_qdisc_qfq(self):
         copy_network_unit('25-qdisc-qfq.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('tc qdisc show dev dummy98')
         print(output)
@@ -4401,7 +4580,7 @@ class NetworkdTCTests(unittest.TestCase, Utilities):
     def test_qdisc_sfb(self):
         copy_network_unit('25-qdisc-sfb.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('tc qdisc show dev dummy98')
         print(output)
@@ -4412,7 +4591,7 @@ class NetworkdTCTests(unittest.TestCase, Utilities):
     def test_qdisc_sfq(self):
         copy_network_unit('25-qdisc-sfq.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('tc qdisc show dev dummy98')
         print(output)
@@ -4423,7 +4602,7 @@ class NetworkdTCTests(unittest.TestCase, Utilities):
     def test_qdisc_tbf(self):
         copy_network_unit('25-qdisc-tbf.network', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('tc qdisc show dev dummy98')
         print(output)
@@ -4438,7 +4617,7 @@ class NetworkdTCTests(unittest.TestCase, Utilities):
         start_networkd()
         self.wait_links('dummy98')
         check_output('modprobe sch_teql max_equalizers=2')
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         output = check_output('tc qdisc show dev dummy98')
         print(output)
@@ -4455,7 +4634,7 @@ class NetworkdStateFileTests(unittest.TestCase, Utilities):
     def test_state_file(self):
         copy_network_unit('12-dummy.netdev', '25-state-file-tests.network')
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
 
         # make link state file updated
         resolvectl('revert', 'dummy98')
@@ -4532,7 +4711,7 @@ class NetworkdStateFileTests(unittest.TestCase, Utilities):
         copy_network_unit('12-dummy.netdev', '12-dummy-no-address.network')
         start_networkd()
 
-        self.wait_online(['dummy98:degraded'])
+        self.wait_online('dummy98:degraded')
 
         output = read_link_state_file('dummy98')
         self.assertIn('IPV4_ADDRESS_STATE=off', output)
@@ -4540,8 +4719,8 @@ class NetworkdStateFileTests(unittest.TestCase, Utilities):
 
         # with a routable IPv4 address
         check_output('ip address add 10.1.2.3/16 dev dummy98')
-        self.wait_online(['dummy98:routable'], ipv4=True)
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable', ipv4=True)
+        self.wait_online('dummy98:routable')
 
         output = read_link_state_file('dummy98')
         self.assertIn('IPV4_ADDRESS_STATE=routable', output)
@@ -4551,8 +4730,8 @@ class NetworkdStateFileTests(unittest.TestCase, Utilities):
 
         # with a routable IPv6 address
         check_output('ip address add 2002:da8:1:0:1034:56ff:fe78:9abc/64 dev dummy98')
-        self.wait_online(['dummy98:routable'], ipv6=True)
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable', ipv6=True)
+        self.wait_online('dummy98:routable')
 
         output = read_link_state_file('dummy98')
         self.assertIn('IPV4_ADDRESS_STATE=off', output)
@@ -4573,7 +4752,7 @@ class NetworkdBondTests(unittest.TestCase, Utilities):
 
         copy_network_unit('23-keep-master.network')
         start_networkd()
-        self.wait_online(['dummy98:enslaved'])
+        self.wait_online('dummy98:enslaved')
 
         output = check_output('ip -d link show bond199')
         print(output)
@@ -4586,7 +4765,7 @@ class NetworkdBondTests(unittest.TestCase, Utilities):
     def test_bond_active_slave(self):
         copy_network_unit('23-active-slave.network', '23-bond199.network', '25-bond-active-backup-slave.netdev', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:enslaved', 'bond199:degraded'])
+        self.wait_online('dummy98:enslaved', 'bond199:degraded')
 
         output = check_output('ip -d link show bond199')
         print(output)
@@ -4595,13 +4774,13 @@ class NetworkdBondTests(unittest.TestCase, Utilities):
         # test case for issue #31165.
         since = datetime.datetime.now()
         networkctl_reconfigure('dummy98')
-        self.wait_online(['dummy98:enslaved', 'bond199:degraded'])
+        self.wait_online('dummy98:enslaved', 'bond199:degraded')
         self.assertNotIn('dummy98: Bringing link down', read_networkd_log(since=since))
 
     def test_bond_primary_slave(self):
         copy_network_unit('23-primary-slave.network', '23-bond199.network', '25-bond-active-backup-slave.netdev', '12-dummy.netdev')
         start_networkd()
-        self.wait_online(['dummy98:enslaved', 'bond199:degraded'])
+        self.wait_online('dummy98:enslaved', 'bond199:degraded')
 
         output = check_output('ip -d link show bond199')
         print(output)
@@ -4614,7 +4793,7 @@ class NetworkdBondTests(unittest.TestCase, Utilities):
                 f.write(f'[Link]\nMACAddress={mac}\n')
 
             networkctl_reload()
-            self.wait_online(['dummy98:enslaved', 'bond199:degraded'])
+            self.wait_online('dummy98:enslaved', 'bond199:degraded')
 
             output = check_output('ip -d link show bond199')
             print(output)
@@ -4624,7 +4803,7 @@ class NetworkdBondTests(unittest.TestCase, Utilities):
         copy_network_unit('25-bond.netdev', '11-dummy.netdev', '12-dummy.netdev',
                           '25-bond99.network', '25-bond-slave.network')
         start_networkd()
-        self.wait_online(['dummy98:enslaved', 'test1:enslaved', 'bond99:routable'])
+        self.wait_online('dummy98:enslaved', 'test1:enslaved', 'bond99:routable')
 
         output = check_output('ip -d link show dummy98')
         print(output)
@@ -4677,7 +4856,7 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
         copy_network_unit('12-dummy-mac.netdev', '26-bridge-mac-slave.network',
                           '26-bridge-mac.netdev', '26-bridge-mac-master.network', '26-bridge-mac.link')
         start_networkd()
-        self.wait_online(['dummy98:enslaved', 'bridge99:degraded'])
+        self.wait_online('dummy98:enslaved', 'bridge99:degraded')
 
         output = check_output('ip link show dev dummy98')
         print(output)
@@ -4692,7 +4871,7 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
                           '26-bridge.netdev', '26-bridge-vlan-master.network',
                           copy_dropins=False)
         start_networkd()
-        self.wait_online(['test1:enslaved', 'bridge99:degraded'])
+        self.wait_online('test1:enslaved', 'bridge99:degraded')
 
         output = check_output('bridge vlan show dev test1')
         print(output)
@@ -4726,7 +4905,7 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
         copy_network_unit('26-bridge-vlan-slave.network.d/10-override.conf',
                           '26-bridge-vlan-master.network.d/10-override.conf')
         networkctl_reload()
-        self.wait_online(['test1:enslaved', 'bridge99:degraded'])
+        self.wait_online('test1:enslaved', 'bridge99:degraded')
 
         output = check_output('bridge vlan show dev test1')
         print(output)
@@ -4756,7 +4935,7 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
         copy_network_unit('26-bridge-vlan-slave.network.d/20-override.conf',
                           '26-bridge-vlan-master.network.d/20-override.conf')
         networkctl_reload()
-        self.wait_online(['test1:enslaved', 'bridge99:degraded'])
+        self.wait_online('test1:enslaved', 'bridge99:degraded')
 
         output = check_output('bridge vlan show dev test1')
         print(output)
@@ -4786,7 +4965,7 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
         copy_network_unit('26-bridge-vlan-slave.network.d/30-override.conf',
                           '26-bridge-vlan-master.network.d/30-override.conf')
         networkctl_reload()
-        self.wait_online(['test1:enslaved', 'bridge99:degraded'])
+        self.wait_online('test1:enslaved', 'bridge99:degraded')
 
         output = check_output('bridge vlan show dev test1')
         print(output)
@@ -4805,7 +4984,7 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
                           '26-bridge-issue-20373.netdev', '26-bridge-vlan-master-issue-20373.network',
                           '21-vlan.netdev', '21-vlan.network')
         start_networkd()
-        self.wait_online(['test1:enslaved', 'bridge99:degraded', 'vlan99:routable'])
+        self.wait_online('test1:enslaved', 'bridge99:degraded', 'vlan99:routable')
 
         output = check_output('bridge vlan show dev test1')
         print(output)
@@ -4823,7 +5002,7 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
         copy_network_unit('11-dummy.netdev', '26-bridge-mdb-slave.network',
                           '26-bridge.netdev', '26-bridge-mdb-master.network')
         start_networkd()
-        self.wait_online(['test1:enslaved', 'bridge99:degraded'])
+        self.wait_online('test1:enslaved', 'bridge99:degraded')
 
         output = check_output('bridge mdb show dev bridge99')
         print(output)
@@ -4843,7 +5022,7 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
 
         copy_network_unit('23-keep-master.network')
         start_networkd()
-        self.wait_online(['dummy98:enslaved'])
+        self.wait_online('dummy98:enslaved')
 
         output = check_output('ip -d link show dummy98')
         print(output)
@@ -4870,7 +5049,7 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
                           '26-bridge-slave-interface-1.network', '26-bridge-slave-interface-2.network',
                           '25-bridge99.network')
         start_networkd()
-        self.wait_online(['dummy98:enslaved', 'test1:enslaved', 'bridge99:routable'])
+        self.wait_online('dummy98:enslaved', 'test1:enslaved', 'bridge99:routable')
 
         output = check_output('ip -d link show bridge99')
         print(output)
@@ -4955,7 +5134,7 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
         self.assertRegex(output, 'ff00::/8 table local (proto kernel )?metric 256 (linkdown )?pref medium')
 
         check_output('ip link add dummy98 type dummy')
-        self.wait_online(['dummy98:enslaved', 'bridge99:routable'])
+        self.wait_online('dummy98:enslaved', 'bridge99:routable')
 
         output = check_output('ip -d link show bridge99')
         print(output)
@@ -4993,22 +5172,22 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
                 elif test == 'slave-up':
                     # bring up slave, which will have carrier; bridge gains carrier
                     check_output('ip link set dev test1 up')
-                    self.wait_online(['bridge99:routable'])
+                    self.wait_online('bridge99:routable')
                     self.check_link_attr('bridge99', 'carrier', '1')
                 elif test == 'slave-no-carrier':
                     # drop slave carrier; bridge loses carrier
                     check_output('ip link set dev test1 carrier off')
-                    self.wait_online(['bridge99:no-carrier:no-carrier'])
+                    self.wait_online('bridge99:no-carrier:no-carrier')
                     self.check_link_attr('bridge99', 'carrier', '0')
                 elif test == 'slave-carrier':
                     # restore slave carrier; bridge gains carrier
                     check_output('ip link set dev test1 carrier on')
-                    self.wait_online(['bridge99:routable'])
+                    self.wait_online('bridge99:routable')
                     self.check_link_attr('bridge99', 'carrier', '1')
                 elif test == 'slave-down':
                     # bring down slave; bridge loses carrier
                     check_output('ip link set dev test1 down')
-                    self.wait_online(['bridge99:no-carrier:no-carrier'])
+                    self.wait_online('bridge99:no-carrier:no-carrier')
                     self.check_link_attr('bridge99', 'carrier', '0')
 
                 output = networkctl_status('bridge99')
@@ -5020,7 +5199,7 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
                           '26-bridge-slave-interface-1.network', '26-bridge-slave-interface-2.network',
                           '25-bridge99-ignore-carrier-loss.network')
         start_networkd()
-        self.wait_online(['dummy98:enslaved', 'test1:enslaved', 'bridge99:routable'])
+        self.wait_online('dummy98:enslaved', 'test1:enslaved', 'bridge99:routable')
 
         check_output('ip address add 192.168.0.16/24 dev bridge99')
         remove_link('test1', 'dummy98')
@@ -5036,7 +5215,7 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
         copy_network_unit('26-bridge.netdev', '26-bridge-slave-interface-1.network',
                           '25-bridge99-ignore-carrier-loss.network')
         start_networkd()
-        self.wait_online(['bridge99:no-carrier'])
+        self.wait_online('bridge99:no-carrier')
 
         for trial in range(4):
             check_output('ip link add dummy98 type dummy')
@@ -5044,7 +5223,7 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
             if trial < 3:
                 remove_link('dummy98')
 
-        self.wait_online(['bridge99:routable', 'dummy98:enslaved'])
+        self.wait_online('bridge99:routable', 'dummy98:enslaved')
 
         output = check_output('ip address show bridge99')
         print(output)
@@ -5075,7 +5254,7 @@ class NetworkdSRIOVTests(unittest.TestCase, Utilities):
             f.write('3')
 
         start_networkd()
-        self.wait_online(['eni99np1:routable'])
+        self.wait_online('eni99np1:routable')
 
         output = check_output('ip link show dev eni99np1')
         print(output)
@@ -5095,7 +5274,7 @@ class NetworkdSRIOVTests(unittest.TestCase, Utilities):
             f.write('99 1')
 
         start_networkd()
-        self.wait_online(['eni99np1:routable'])
+        self.wait_online('eni99np1:routable')
 
         # the name eni99np1 may be an alternative name.
         ifname = link_resolve('eni99np1')
@@ -5113,8 +5292,8 @@ class NetworkdSRIOVTests(unittest.TestCase, Utilities):
         with open(os.path.join(network_unit_dir, '25-sriov.link'), mode='a', encoding='utf-8') as f:
             f.write('[Link]\nSR-IOVVirtualFunctions=4\n')
 
-        udev_reload()
-        check_output(*udevadm_cmd, 'trigger', '--action=add', '--settle', f'/sys/devices/netdevsim99/net/{ifname}')
+        udevadm_reload()
+        udevadm_trigger(f'/sys/devices/netdevsim99/net/{ifname}')
 
         output = check_output('ip link show dev eni99np1')
         print(output)
@@ -5129,8 +5308,8 @@ class NetworkdSRIOVTests(unittest.TestCase, Utilities):
         with open(os.path.join(network_unit_dir, '25-sriov.link'), mode='a', encoding='utf-8') as f:
             f.write('[Link]\nSR-IOVVirtualFunctions=\n')
 
-        udev_reload()
-        check_output(*udevadm_cmd, 'trigger', '--action=add', '--settle', f'/sys/devices/netdevsim99/net/{ifname}')
+        udevadm_reload()
+        udevadm_trigger(f'/sys/devices/netdevsim99/net/{ifname}')
 
         output = check_output('ip link show dev eni99np1')
         print(output)
@@ -5145,8 +5324,8 @@ class NetworkdSRIOVTests(unittest.TestCase, Utilities):
         with open(os.path.join(network_unit_dir, '25-sriov.link'), mode='a', encoding='utf-8') as f:
             f.write('[Link]\nSR-IOVVirtualFunctions=2\n')
 
-        udev_reload()
-        check_output(*udevadm_cmd, 'trigger', '--action=add', '--settle', f'/sys/devices/netdevsim99/net/{ifname}')
+        udevadm_reload()
+        udevadm_trigger(f'/sys/devices/netdevsim99/net/{ifname}')
 
         output = check_output('ip link show dev eni99np1')
         print(output)
@@ -5161,8 +5340,8 @@ class NetworkdSRIOVTests(unittest.TestCase, Utilities):
         with open(os.path.join(network_unit_dir, '25-sriov.link'), mode='a', encoding='utf-8') as f:
             f.write('[Link]\nSR-IOVVirtualFunctions=\n')
 
-        udev_reload()
-        check_output(*udevadm_cmd, 'trigger', '--action=add', '--settle', f'/sys/devices/netdevsim99/net/{ifname}')
+        udevadm_reload()
+        udevadm_trigger(f'/sys/devices/netdevsim99/net/{ifname}')
 
         output = check_output('ip link show dev eni99np1')
         print(output)
@@ -5185,7 +5364,7 @@ class NetworkdLLDPTests(unittest.TestCase, Utilities):
     def test_lldp(self):
         copy_network_unit('23-emit-lldp.network', '24-lldp.network', '25-veth.netdev')
         start_networkd()
-        self.wait_online(['veth99:degraded', 'veth-peer:degraded'])
+        self.wait_online('veth99:degraded', 'veth-peer:degraded')
 
         for trial in range(10):
             if trial > 0:
@@ -5193,11 +5372,101 @@ class NetworkdLLDPTests(unittest.TestCase, Utilities):
 
             output = networkctl('lldp')
             print(output)
-            if re.search(r'veth99 .* veth-peer', output):
+            if re.search(r'veth99 .* veth-peer .* .......a...', output):
                 break
         else:
             self.fail()
 
+        # With interface name
+        output = networkctl('lldp', 'veth99');
+        print(output)
+        self.assertRegex(output, r'veth99 .* veth-peer .* .......a...')
+
+        # With interface name pattern
+        output = networkctl('lldp', 've*9');
+        print(output)
+        self.assertRegex(output, r'veth99 .* veth-peer .* .......a...')
+
+        # json format
+        output = networkctl('--json=short', 'lldp')
+        print(output)
+        self.assertIn('"InterfaceName":"veth99"', output)
+        self.assertIn('"PortID":"veth-peer"', output)
+        self.assertIn('"EnabledCapabilities":128', output)
+
+        # json format with interface name
+        output = networkctl('--json=short', 'lldp', 'veth99')
+        print(output)
+        self.assertIn('"InterfaceName":"veth99"', output)
+        self.assertIn('"PortID":"veth-peer"', output)
+        self.assertIn('"EnabledCapabilities":128', output)
+
+        # json format with interface name pattern
+        output = networkctl('--json=short', 'lldp', 've*9')
+        print(output)
+        self.assertIn('"InterfaceName":"veth99"', output)
+        self.assertIn('"PortID":"veth-peer"', output)
+        self.assertIn('"EnabledCapabilities":128', output)
+
+        # LLDP neighbors in status
+        output = networkctl_status('veth99')
+        print(output)
+        self.assertRegex(output, r'Connected To: .* on port veth-peer')
+
+        # enable forwarding, to enable the Router flag
+        with open(os.path.join(network_unit_dir, '23-emit-lldp.network'), mode='a', encoding='utf-8') as f:
+            f.write('[Network]\nIPv4Forwarding=yes\n')
+
+        networkctl_reload()
+        self.wait_online('veth-peer:degraded')
+
+        for trial in range(10):
+            if trial > 0:
+                time.sleep(1)
+
+            output = networkctl('lldp')
+            print(output)
+            if re.search(r'veth99 .* veth-peer .* ....r......', output):
+                break
+        else:
+            self.fail()
+
+        # With interface name
+        output = networkctl('lldp', 'veth99');
+        print(output)
+        self.assertRegex(output, r'veth99 .* veth-peer .* ....r......')
+
+        # With interface name pattern
+        output = networkctl('lldp', 've*9');
+        print(output)
+        self.assertRegex(output, r'veth99 .* veth-peer .* ....r......')
+
+        # json format
+        output = networkctl('--json=short', 'lldp')
+        print(output)
+        self.assertIn('"InterfaceName":"veth99"', output)
+        self.assertIn('"PortID":"veth-peer"', output)
+        self.assertIn('"EnabledCapabilities":16', output)
+
+        # json format with interface name
+        output = networkctl('--json=short', 'lldp', 'veth99')
+        print(output)
+        self.assertIn('"InterfaceName":"veth99"', output)
+        self.assertIn('"PortID":"veth-peer"', output)
+        self.assertIn('"EnabledCapabilities":16', output)
+
+        # json format with interface name pattern
+        output = networkctl('--json=short', 'lldp', 've*9')
+        print(output)
+        self.assertIn('"InterfaceName":"veth99"', output)
+        self.assertIn('"PortID":"veth-peer"', output)
+        self.assertIn('"EnabledCapabilities":16', output)
+
+        # LLDP neighbors in status
+        output = networkctl_status('veth99')
+        print(output)
+        self.assertRegex(output, r'Connected To: .* on port veth-peer')
+
 class NetworkdRATests(unittest.TestCase, Utilities):
 
     def setUp(self):
@@ -5212,7 +5481,10 @@ class NetworkdRATests(unittest.TestCase, Utilities):
         self.setup_nftset('network6', 'ipv6_addr', 'flags interval;')
         self.setup_nftset('ifindex', 'iface_index')
         start_networkd()
-        self.wait_online(['veth99:routable', 'veth-peer:degraded'])
+        self.wait_online('veth99:routable', 'veth-peer:degraded')
+
+        # IPv6SendRA=yes implies IPv6Forwarding.
+        self.check_ipv6_sysctl_attr('veth-peer', 'forwarding', '1')
 
         output = resolvectl('dns', 'veth99')
         print(output)
@@ -5239,7 +5511,7 @@ class NetworkdRATests(unittest.TestCase, Utilities):
         self.teardown_nftset('addr6', 'network6', 'ifindex')
 
     def check_ipv6_token_static(self):
-        self.wait_online(['veth99:routable', 'veth-peer:degraded'])
+        self.wait_online('veth99:routable', 'veth-peer:degraded')
 
         output = networkctl_status('veth99')
         print(output)
@@ -5268,10 +5540,42 @@ class NetworkdRATests(unittest.TestCase, Utilities):
 
         self.check_ipv6_token_static()
 
+    def test_ndisc_redirect(self):
+        if not os.path.exists(test_ndisc_send):
+            self.skipTest(f"{test_ndisc_send} does not exist.")
+
+        copy_network_unit('25-veth.netdev', '25-ipv6-prefix.network', '25-ipv6-prefix-veth-token-static.network')
+        start_networkd()
+
+        self.check_ipv6_token_static()
+
+        # Introduce two redirect routes.
+        check_output(f'{test_ndisc_send} --interface veth-peer --type redirect --target-address 2002:da8:1:1:1a:2b:3c:4d --redirect-destination 2002:da8:1:1:1a:2b:3c:4d')
+        check_output(f'{test_ndisc_send} --interface veth-peer --type redirect --target-address 2002:da8:1::1 --redirect-destination 2002:da8:1:2:1a:2b:3c:4d')
+        self.wait_route('veth99', r'2002:da8:1:1:1a:2b:3c:4d proto redirect', ipv='-6', timeout_sec=10)
+        self.wait_route('veth99', r'2002:da8:1:2:1a:2b:3c:4d via 2002:da8:1::1 proto redirect', ipv='-6', timeout_sec=10)
+
+        # Change the target address of the redirects.
+        check_output(f'{test_ndisc_send} --interface veth-peer --type redirect --target-address 2002:da8:1::2 --redirect-destination 2002:da8:1:1:1a:2b:3c:4d')
+        check_output(f'{test_ndisc_send} --interface veth-peer --type redirect --target-address 2002:da8:1::3 --redirect-destination 2002:da8:1:2:1a:2b:3c:4d')
+        self.wait_route_dropped('veth99', r'2002:da8:1:1:1a:2b:3c:4d proto redirect', ipv='-6', timeout_sec=10)
+        self.wait_route_dropped('veth99', r'2002:da8:1:2:1a:2b:3c:4d via 2002:da8:1::1 proto redirect', ipv='-6', timeout_sec=10)
+        self.wait_route('veth99', r'2002:da8:1:1:1a:2b:3c:4d via 2002:da8:1::2 proto redirect', ipv='-6', timeout_sec=10)
+        self.wait_route('veth99', r'2002:da8:1:2:1a:2b:3c:4d via 2002:da8:1::3 proto redirect', ipv='-6', timeout_sec=10)
+
+        # Send Neighbor Advertisement without the router flag to announce the default router is not available anymore.
+        # Then, verify that all redirect routes and the default route are dropped.
+        output = check_output('ip -6 address show dev veth-peer scope link')
+        veth_peer_ipv6ll = re.search('fe80:[:0-9a-f]*', output).group()
+        print(f'veth-peer IPv6LL address: {veth_peer_ipv6ll}')
+        check_output(f'{test_ndisc_send} --interface veth-peer --type neighbor-advertisement --target-address {veth_peer_ipv6ll} --is-router no')
+        self.wait_route_dropped('veth99', 'proto redirect', ipv='-6', timeout_sec=10)
+        self.wait_route_dropped('veth99', 'proto ra', ipv='-6', timeout_sec=10)
+
     def test_ipv6_token_prefixstable(self):
         copy_network_unit('25-veth.netdev', '25-ipv6-prefix.network', '25-ipv6-prefix-veth-token-prefixstable.network')
         start_networkd()
-        self.wait_online(['veth99:routable', 'veth-peer:degraded'])
+        self.wait_online('veth99:routable', 'veth-peer:degraded')
 
         output = networkctl_status('veth99')
         print(output)
@@ -5281,13 +5585,44 @@ class NetworkdRATests(unittest.TestCase, Utilities):
     def test_ipv6_token_prefixstable_without_address(self):
         copy_network_unit('25-veth.netdev', '25-ipv6-prefix.network', '25-ipv6-prefix-veth-token-prefixstable-without-address.network')
         start_networkd()
-        self.wait_online(['veth99:routable', 'veth-peer:degraded'])
+        self.wait_online('veth99:routable', 'veth-peer:degraded')
 
         output = networkctl_status('veth99')
         print(output)
         self.assertIn('2002:da8:1:0:b47e:7975:fc7a:7d6e', output)
         self.assertIn('2002:da8:2:0:f689:561a:8eda:7443', output)
 
+    def check_router_hop_limit(self, hop_limit):
+        self.wait_route('client', rf'default via fe80::1034:56ff:fe78:9a99 proto ra .* hoplimit {hop_limit}', ipv='-6', timeout_sec=10)
+
+        output = check_output('ip -6 route show dev client default via fe80::1034:56ff:fe78:9a99')
+        print(output)
+        self.assertIn(f'hoplimit {hop_limit}', output)
+
+        self.check_ipv6_sysctl_attr('client', 'hop_limit', f'{hop_limit}')
+
+    def test_router_hop_limit(self):
+        copy_network_unit('25-veth-client.netdev',
+                          '25-veth-router.netdev',
+                          '26-bridge.netdev',
+                          '25-veth-bridge.network',
+                          '25-veth-client.network',
+                          '25-veth-router-hop-limit.network',
+                          '25-bridge99.network')
+        start_networkd()
+        self.wait_online('client-p:enslaved',
+                         'router:degraded', 'router-p:enslaved',
+                         'bridge99:routable')
+
+        self.check_router_hop_limit(42)
+
+        with open(os.path.join(network_unit_dir, '25-veth-router-hop-limit.network'), mode='a', encoding='utf-8') as f:
+            f.write('\n[IPv6SendRA]\nHopLimit=43\n')
+
+        networkctl_reload()
+
+        self.check_router_hop_limit(43)
+
     def test_router_preference(self):
         copy_network_unit('25-veth-client.netdev',
                           '25-veth-router-high.netdev',
@@ -5299,13 +5634,13 @@ class NetworkdRATests(unittest.TestCase, Utilities):
                           '25-veth-router-low.network',
                           '25-bridge99.network')
         start_networkd()
-        self.wait_online(['client-p:enslaved',
-                          'router-high:degraded', 'router-high-p:enslaved',
-                          'router-low:degraded', 'router-low-p:enslaved',
-                          'bridge99:routable'])
+        self.wait_online('client-p:enslaved',
+                         'router-high:degraded', 'router-high-p:enslaved',
+                         'router-low:degraded', 'router-low-p:enslaved',
+                         'bridge99:routable')
 
         networkctl_reconfigure('client')
-        self.wait_online(['client:routable'])
+        self.wait_online('client:routable')
 
         self.wait_address('client', '2002:da8:1:99:1034:56ff:fe78:9a00/64', ipv='-6', timeout_sec=10)
         self.wait_address('client', '2002:da8:1:98:1034:56ff:fe78:9a00/64', ipv='-6', timeout_sec=10)
@@ -5314,16 +5649,18 @@ class NetworkdRATests(unittest.TestCase, Utilities):
 
         output = check_output('ip -6 route show dev client default via fe80::1034:56ff:fe78:9a99')
         print(output)
+        self.assertIn('metric 512', output)
         self.assertIn('pref high', output)
         output = check_output('ip -6 route show dev client default via fe80::1034:56ff:fe78:9a98')
         print(output)
+        self.assertIn('metric 2048', output)
         self.assertIn('pref low', output)
 
         with open(os.path.join(network_unit_dir, '25-veth-client.network'), mode='a', encoding='utf-8') as f:
             f.write('\n[Link]\nMACAddress=12:34:56:78:9a:01\n[IPv6AcceptRA]\nRouteMetric=100:200:300\n')
 
         networkctl_reload()
-        self.wait_online(['client:routable'])
+        self.wait_online('client:routable')
 
         self.wait_address('client', '2002:da8:1:99:1034:56ff:fe78:9a01/64', ipv='-6', timeout_sec=10)
         self.wait_address('client', '2002:da8:1:98:1034:56ff:fe78:9a01/64', ipv='-6', timeout_sec=10)
@@ -5332,10 +5669,34 @@ class NetworkdRATests(unittest.TestCase, Utilities):
 
         output = check_output('ip -6 route show dev client default via fe80::1034:56ff:fe78:9a99')
         print(output)
+        self.assertIn('metric 100', output)
+        self.assertNotIn('metric 512', output)
         self.assertIn('pref high', output)
         output = check_output('ip -6 route show dev client default via fe80::1034:56ff:fe78:9a98')
         print(output)
+        self.assertIn('metric 300', output)
+        self.assertNotIn('metric 2048', output)
+        self.assertIn('pref low', output)
+
+        # swap the preference (for issue #28439)
+        remove_network_unit('25-veth-router-high.network', '25-veth-router-low.network')
+        copy_network_unit('25-veth-router-high2.network', '25-veth-router-low2.network')
+        networkctl_reload()
+        self.wait_route('client', 'default via fe80::1034:56ff:fe78:9a99 proto ra metric 300', ipv='-6', timeout_sec=10)
+        self.wait_route('client', 'default via fe80::1034:56ff:fe78:9a98 proto ra metric 100', ipv='-6', timeout_sec=10)
+
+        output = check_output('ip -6 route show dev client default via fe80::1034:56ff:fe78:9a99')
+        print(output)
+        self.assertIn('metric 300', output)
+        self.assertNotIn('metric 100', output)
         self.assertIn('pref low', output)
+        self.assertNotIn('pref high', output)
+        output = check_output('ip -6 route show dev client default via fe80::1034:56ff:fe78:9a98')
+        print(output)
+        self.assertIn('metric 100', output)
+        self.assertNotIn('metric 300', output)
+        self.assertIn('pref high', output)
+        self.assertNotIn('pref low', output)
 
     @unittest.skipUnless(radvd_check_config('captive-portal.conf'), "Installed radvd doesn't support captive portals")
     def test_captive_portal(self):
@@ -5347,12 +5708,12 @@ class NetworkdRATests(unittest.TestCase, Utilities):
                           '25-veth-bridge-captive.network',
                           '25-bridge99.network')
         start_networkd()
-        self.wait_online(['bridge99:routable', 'client-p:enslaved',
-                          'router-captive:degraded', 'router-captivep:enslaved'])
+        self.wait_online('bridge99:routable', 'client-p:enslaved',
+                          'router-captive:degraded', 'router-captivep:enslaved')
 
         start_radvd(config_file='captive-portal.conf')
         networkctl_reconfigure('client')
-        self.wait_online(['client:routable'])
+        self.wait_online('client:routable')
 
         self.wait_address('client', '2002:da8:1:99:1034:56ff:fe78:9a00/64', ipv='-6', timeout_sec=10)
         output = networkctl_status('client')
@@ -5379,8 +5740,8 @@ class NetworkdRATests(unittest.TestCase, Utilities):
                           '25-veth-bridge-captive.network',
                           '25-bridge99.network')
         start_networkd()
-        self.wait_online(['bridge99:routable', 'client-p:enslaved',
-                          'router-captive:degraded', 'router-captivep:enslaved'])
+        self.wait_online('bridge99:routable', 'client-p:enslaved',
+                         'router-captive:degraded', 'router-captivep:enslaved')
 
         for uri in captive_portal_uris:
             print(f"Captive portal: {uri}")
@@ -5388,7 +5749,7 @@ class NetworkdRATests(unittest.TestCase, Utilities):
             stop_radvd()
             start_radvd(config_file='bogus-captive-portal.conf')
             networkctl_reconfigure('client')
-            self.wait_online(['client:routable'])
+            self.wait_online('client:routable')
 
             self.wait_address('client', '2002:da8:1:99:1034:56ff:fe78:9a00/64', ipv='-6', timeout_sec=10)
             output = networkctl_status('client')
@@ -5403,11 +5764,7 @@ class NetworkdDHCPServerTests(unittest.TestCase, Utilities):
     def tearDown(self):
         tear_down_common()
 
-    def test_dhcp_server(self):
-        copy_network_unit('25-veth.netdev', '25-dhcp-client.network', '25-dhcp-server.network')
-        start_networkd()
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
-
+    def check_dhcp_server(self, persist_leases=True):
         output = networkctl_status('veth99')
         print(output)
         self.assertRegex(output, r'Address: 192.168.5.[0-9]* \(DHCP4 via 192.168.5.1\)')
@@ -5416,12 +5773,53 @@ class NetworkdDHCPServerTests(unittest.TestCase, Utilities):
         self.assertRegex(output, 'NTP: 192.168.5.1\n *192.168.5.11')
 
         output = networkctl_status('veth-peer')
+        print(output)
         self.assertRegex(output, "Offered DHCP leases: 192.168.5.[0-9]*")
 
+        if persist_leases:
+            with open('/var/lib/systemd/network/dhcp-server-lease/veth-peer', encoding='utf-8') as f:
+                check_json(f.read())
+        else:
+            self.assertFalse(os.path.exists('/var/lib/systemd/network/dhcp-server-lease/veth-peer'))
+
+    def test_dhcp_server(self):
+        copy_network_unit('25-veth.netdev', '25-dhcp-client.network', '25-dhcp-server.network')
+        start_networkd()
+        self.wait_online('veth99:routable', 'veth-peer:routable')
+
+        self.check_dhcp_server()
+
+        networkctl_reconfigure('veth-peer')
+        self.wait_online('veth-peer:routable')
+
+        for _ in range(10):
+            output = check_output(*networkctl_cmd, '-n', '0', 'status', 'veth-peer', env=env)
+            if 'Offered DHCP leases: 192.168.5.' in output:
+                break
+            time.sleep(.2)
+        else:
+            self.fail()
+
+    def test_dhcp_server_persist_leases_no(self):
+        copy_networkd_conf_dropin('persist-leases-no.conf')
+        copy_network_unit('25-veth.netdev', '25-dhcp-client.network', '25-dhcp-server.network')
+        start_networkd()
+        self.wait_online('veth99:routable', 'veth-peer:routable')
+
+        self.check_dhcp_server(persist_leases=False)
+
+        remove_networkd_conf_dropin('persist-leases-no.conf')
+        with open(os.path.join(network_unit_dir, '25-dhcp-server.network'), mode='a', encoding='utf-8') as f:
+            f.write('[DHCPServer]\nPersistLeases=no')
+        restart_networkd()
+        self.wait_online('veth99:routable', 'veth-peer:routable')
+
+        self.check_dhcp_server(persist_leases=False)
+
     def test_dhcp_server_null_server_address(self):
         copy_network_unit('25-veth.netdev', '25-dhcp-client.network', '25-dhcp-server-null-server-address.network')
         start_networkd()
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
 
         output = check_output('ip --json address show dev veth-peer')
         server_address = json.loads(output)[0]['addr_info'][0]['local']
@@ -5441,11 +5839,33 @@ class NetworkdDHCPServerTests(unittest.TestCase, Utilities):
         output = networkctl_status('veth-peer')
         self.assertIn(f'Offered DHCP leases: {client_address}', output)
 
+        # Check if the same addresses are used even if the service is restarted.
+        restart_networkd()
+        self.wait_online('veth99:routable', 'veth-peer:routable')
+
+        output = check_output('ip -4 address show dev veth-peer')
+        print(output)
+        self.assertIn(f'{server_address}', output)
+
+        output = check_output('ip -4 address show dev veth99')
+        print(output)
+        self.assertIn(f'{client_address}', output)
+
+        output = networkctl_status('veth99')
+        print(output)
+        self.assertRegex(output, rf'Address: {client_address} \(DHCP4 via {server_address}\)')
+        self.assertIn(f'Gateway: {server_address}', output)
+        self.assertIn(f'DNS: {server_address}', output)
+        self.assertIn(f'NTP: {server_address}', output)
+
+        output = networkctl_status('veth-peer')
+        self.assertIn(f'Offered DHCP leases: {client_address}', output)
+
     def test_dhcp_server_with_uplink(self):
         copy_network_unit('25-veth.netdev', '25-dhcp-client.network', '25-dhcp-server-downstream.network',
                           '12-dummy.netdev', '25-dhcp-server-uplink.network')
         start_networkd()
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
 
         output = networkctl_status('veth99')
         print(output)
@@ -5457,7 +5877,7 @@ class NetworkdDHCPServerTests(unittest.TestCase, Utilities):
     def test_emit_router_timezone(self):
         copy_network_unit('25-veth.netdev', '25-dhcp-client-timezone-router.network', '25-dhcp-server-timezone-router.network')
         start_networkd()
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
 
         output = networkctl_status('veth99')
         print(output)
@@ -5468,7 +5888,7 @@ class NetworkdDHCPServerTests(unittest.TestCase, Utilities):
     def test_dhcp_server_static_lease(self):
         copy_network_unit('25-veth.netdev', '25-dhcp-client-static-lease.network', '25-dhcp-server-static-lease.network')
         start_networkd()
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
 
         output = networkctl_status('veth99')
         print(output)
@@ -5478,7 +5898,7 @@ class NetworkdDHCPServerTests(unittest.TestCase, Utilities):
     def test_dhcp_server_static_lease_default_client_id(self):
         copy_network_unit('25-veth.netdev', '25-dhcp-client.network', '25-dhcp-server-static-lease.network')
         start_networkd()
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
 
         output = networkctl_status('veth99')
         print(output)
@@ -5502,20 +5922,20 @@ class NetworkdDHCPServerRelayAgentTests(unittest.TestCase, Utilities):
                           '25-agent-server-peer.network')
         start_networkd()
 
-        self.wait_online(['client:routable'])
+        self.wait_online('client:routable')
 
         output = networkctl_status('client')
         print(output)
         self.assertRegex(output, r'Address: 192.168.5.150 \(DHCP4 via 192.168.5.1\)')
 
-    def test_replay_agent_on_bridge(self):
+    def test_relay_agent_on_bridge(self):
         copy_network_unit('25-agent-bridge.netdev',
                           '25-agent-veth-client.netdev',
                           '25-agent-bridge.network',
                           '25-agent-bridge-port.network',
                           '25-agent-client.network')
         start_networkd()
-        self.wait_online(['bridge-relay:routable', 'client-peer:enslaved'])
+        self.wait_online('bridge-relay:routable', 'client-peer:enslaved')
 
         # For issue #30763.
         expect = 'bridge-relay: DHCPv4 server: STARTED'
@@ -5538,7 +5958,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         copy_network_unit('25-veth.netdev', '25-dhcp-server-veth-peer.network', '25-dhcp-client-ipv6-only.network')
 
         start_networkd()
-        self.wait_online(['veth-peer:carrier'])
+        self.wait_online('veth-peer:carrier')
 
         # information request mode
         # The name ipv6-only option may not be supported by older dnsmasq
@@ -5547,7 +5967,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
                       '--dhcp-option=option6:dns-server,[2600::ee]',
                       '--dhcp-option=option6:ntp-server,[2600::ff]',
                       ra_mode='ra-stateless')
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
 
         # DHCPv6 REPLY for INFORMATION-REQUEST may be received after the link entered configured state.
         # Let's wait for the expected DNS server being listed in the state file.
@@ -5589,7 +6009,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
                       '--dhcp-option=option6:dns-server,[2600::ee]',
                       '--dhcp-option=option6:ntp-server,[2600::ff]')
         networkctl_reconfigure('veth99')
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
 
         # checking address
         output = check_output('ip address show dev veth99 scope global')
@@ -5647,7 +6067,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
                       '--dhcp-option=option6:ntp-server,[2600::ff]')
 
         networkctl_reload()
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
 
         # checking address
         output = check_output('ip address show dev veth99 scope global')
@@ -5693,7 +6113,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
     def test_dhcp_client_ipv6_dbus_status(self):
         copy_network_unit('25-veth.netdev', '25-dhcp-server-veth-peer.network', '25-dhcp-client-ipv6-only.network')
         start_networkd()
-        self.wait_online(['veth-peer:carrier'])
+        self.wait_online('veth-peer:carrier')
 
         # Note that at this point the DHCPv6 client has not been started because no RA (with managed
         # bit set) has yet been received and the configuration does not include WithoutRA=true
@@ -5706,7 +6126,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         self.assertEqual(state, 'selecting')
 
         start_dnsmasq('--dhcp-option=108,00:00:02:00')
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
 
         state = get_dhcp6_client_state('veth99')
         print(f"DHCPv6 client state = {state}")
@@ -5751,9 +6171,9 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         copy_network_unit('25-veth.netdev', '25-dhcp-server-veth-peer.network', '25-dhcp-client-ipv6-only-custom-client-identifier.network')
 
         start_networkd()
-        self.wait_online(['veth-peer:carrier'])
+        self.wait_online('veth-peer:carrier')
         start_dnsmasq()
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
 
         # checking address
         output = check_output('ip address show dev veth99 scope global')
@@ -5778,13 +6198,13 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         self.setup_nftset('ifindex', 'iface_index')
 
         start_networkd()
-        self.wait_online(['veth-peer:carrier'])
+        self.wait_online('veth-peer:carrier')
         start_dnsmasq('--dhcp-option=option:dns-server,192.168.5.6,192.168.5.7',
                       '--dhcp-option=option:sip-server,192.168.5.21,192.168.5.22',
                       '--dhcp-option=option:domain-search,example.com',
                       '--dhcp-alternate-port=67,5555',
                       ipv4_range='192.168.5.110,192.168.5.119')
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
         self.wait_address('veth99', r'inet 192.168.5.11[0-9]*/24', ipv='-4')
 
         print('## ip address show dev veth99 scope global')
@@ -5878,7 +6298,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         self.wait_address_dropped('veth99', f'inet {address1}/24', ipv='-4', timeout_sec=120)
         self.wait_address('veth99', r'inet 192.168.5.12[0-9]*/24', ipv='-4')
 
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
 
         print('## ip address show dev veth99 scope global')
         output = check_output('ip address show dev veth99 scope global')
@@ -5971,7 +6391,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
     def test_dhcp_client_ipv4_dbus_status(self):
         copy_network_unit('25-veth.netdev', '25-dhcp-server-veth-peer.network', '25-dhcp-client-ipv4-only.network')
         start_networkd()
-        self.wait_online(['veth-peer:carrier'])
+        self.wait_online('veth-peer:carrier')
 
         state = get_dhcp4_client_state('veth99')
         print(f"State = {state}")
@@ -5981,7 +6401,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
                       '--dhcp-option=option:domain-search,example.com',
                       '--dhcp-alternate-port=67,5555',
                       ipv4_range='192.168.5.110,192.168.5.119')
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
         self.wait_address('veth99', r'inet 192.168.5.11[0-9]*/24', ipv='-4')
 
         state = get_dhcp4_client_state('veth99')
@@ -5992,7 +6412,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         copy_network_unit('25-veth.netdev', '25-dhcp-server-veth-peer.network', '25-dhcp-client-allow-list.network', copy_dropins=False)
 
         start_networkd()
-        self.wait_online(['veth-peer:carrier'])
+        self.wait_online('veth-peer:carrier')
         since = datetime.datetime.now()
         start_dnsmasq()
 
@@ -6032,10 +6452,10 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
     def test_dhcp_client_rapid_commit(self):
         copy_network_unit('25-veth.netdev', '25-dhcp-server-veth-peer.network', '25-dhcp-client.network')
         start_networkd()
-        self.wait_online(['veth-peer:carrier'])
+        self.wait_online('veth-peer:carrier')
 
         start_dnsmasq('--dhcp-rapid-commit')
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
         self.wait_address('veth99', r'inet 192.168.5.[0-9]*/24', ipv='-4')
 
         state = get_dhcp4_client_state('veth99')
@@ -6053,7 +6473,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
                           '25-dhcp-server-ipv6-only-mode.network',
                           '25-dhcp-client-ipv6-only-mode.network')
         start_networkd()
-        self.wait_online(['veth99:routable', 'veth-peer:routable'], timeout='40s')
+        self.wait_online('veth99:routable', 'veth-peer:routable', timeout='40s')
         self.wait_address('veth99', r'inet 192.168.5.[0-9]*/24', ipv='-4')
 
         state = get_dhcp4_client_state('veth99')
@@ -6081,7 +6501,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         copy_network_unit(*testunits, copy_dropins=False)
 
         start_networkd()
-        self.wait_online(['veth-peer:carrier'])
+        self.wait_online('veth-peer:carrier')
         additional_options = [
             '--dhcp-option=option:dns-server,192.168.5.10,8.8.8.8',
             '--dhcp-option=option:ntp-server,192.168.5.11,9.9.9.9',
@@ -6092,7 +6512,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
                 '--dhcp-option=option:classless-static-route,0.0.0.0/0,192.168.5.4,8.0.0.0/8,192.168.5.5,192.168.5.64/26,192.168.5.5'
             ]
         start_dnsmasq(*additional_options)
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
 
         output = check_output('ip -4 route show dev veth99')
         print(output)
@@ -6157,9 +6577,9 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
     def test_dhcp_client_settings_anonymize(self):
         copy_network_unit('25-veth.netdev', '25-dhcp-server-veth-peer.network', '25-dhcp-client-anonymize.network')
         start_networkd()
-        self.wait_online(['veth-peer:carrier'])
+        self.wait_online('veth-peer:carrier')
         start_dnsmasq()
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
 
         print('## dnsmasq log')
         output = read_dnsmasq_log_file()
@@ -6173,9 +6593,9 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
                           '25-dhcp-server-veth-peer.network',
                           '25-dhcp-client-keep-configuration-dhcp.network')
         start_networkd()
-        self.wait_online(['veth-peer:carrier'])
+        self.wait_online('veth-peer:carrier')
         start_dnsmasq()
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
 
         output = check_output('ip address show dev veth99 scope global')
         print(output)
@@ -6207,7 +6627,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
             f.write('[Network]\nDHCP=no\n')
 
         start_networkd()
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
 
         # Still the lease address should be kept after networkd restarted
         output = check_output('ip address show dev veth99 scope global')
@@ -6220,9 +6640,9 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
                           '25-dhcp-server-veth-peer.network',
                           '25-dhcp-client-keep-configuration-dhcp-on-stop.network')
         start_networkd()
-        self.wait_online(['veth-peer:carrier'])
+        self.wait_online('veth-peer:carrier')
         start_dnsmasq()
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
 
         output = check_output('ip address show dev veth99 scope global')
         print(output)
@@ -6236,7 +6656,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         self.assertRegex(output, r'inet 192.168.5.[0-9]*/24 metric 1024 brd 192.168.5.255 scope global dynamic veth99')
 
         start_networkd()
-        self.wait_online(['veth-peer:routable'])
+        self.wait_online('veth-peer:routable')
 
         output = check_output('ip address show dev veth99 scope global')
         print(output)
@@ -6245,9 +6665,9 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
     def test_dhcp_client_reuse_address_as_static(self):
         copy_network_unit('25-veth.netdev', '25-dhcp-server-veth-peer.network', '25-dhcp-client.network')
         start_networkd()
-        self.wait_online(['veth-peer:carrier'])
+        self.wait_online('veth-peer:carrier')
         start_dnsmasq()
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
 
         # link become 'routable' when at least one protocol provide an valid address.
         self.wait_address('veth99', r'inet 192.168.5.[0-9]*/24 metric 1024 brd 192.168.5.255 scope global dynamic', ipv='-4')
@@ -6265,7 +6685,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
             f.write(static_network)
 
         restart_networkd()
-        self.wait_online(['veth99:routable'])
+        self.wait_online('veth99:routable')
 
         output = check_output('ip -4 address show dev veth99 scope global')
         print(output)
@@ -6282,9 +6702,9 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         copy_network_unit('25-veth.netdev', '25-dhcp-server-veth-peer.network', '25-dhcp-client-vrf.network',
                           '25-vrf.netdev', '25-vrf.network')
         start_networkd()
-        self.wait_online(['veth-peer:carrier'])
+        self.wait_online('veth-peer:carrier')
         start_dnsmasq()
-        self.wait_online(['veth99:routable', 'veth-peer:routable', 'vrf99:carrier'])
+        self.wait_online('veth99:routable', 'veth-peer:routable', 'vrf99:carrier')
 
         # link become 'routable' when at least one protocol provide an valid address.
         self.wait_address('veth99', r'inet 192.168.5.[0-9]*/24 metric 1024 brd 192.168.5.255 scope global dynamic', ipv='-4')
@@ -6325,9 +6745,9 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         copy_network_unit('25-veth.netdev', '25-dhcp-server-veth-peer.network',
                           '25-dhcp-client-gateway-onlink-implicit.network')
         start_networkd()
-        self.wait_online(['veth-peer:carrier'])
+        self.wait_online('veth-peer:carrier')
         start_dnsmasq()
-        self.wait_online(['veth99:routable', 'veth-peer:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable')
 
         output = networkctl_status('veth99')
         print(output)
@@ -6346,7 +6766,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         start_networkd()
         # we need to increase timeout above default, as this will need to wait for
         # systemd-networkd to get the dhcpv4 transient failure event
-        self.wait_online(['veth99:degraded', 'veth-peer:routable'], timeout='60s')
+        self.wait_online('veth99:degraded', 'veth-peer:routable', timeout='60s')
 
         output = check_output('ip -4 address show dev veth99')
         print(output)
@@ -6357,7 +6777,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         print('Wait for a DHCP lease to be acquired and the IPv4LL address to be dropped')
         self.wait_address('veth99', r'inet 192\.168\.5\.\d+/24 metric 1024 brd 192\.168\.5\.255 scope global dynamic', ipv='-4')
         self.wait_address_dropped('veth99', r'inet 169\.254\.\d+\.\d+/16 metric 2048 brd 169\.254\.255\.255 scope link', scope='link', ipv='-4')
-        self.wait_online(['veth99:routable'])
+        self.wait_online('veth99:routable')
 
         output = check_output('ip -4 address show dev veth99')
         print(output)
@@ -6386,7 +6806,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
                 f.write('\n[IPv6AcceptRA]\nUseDNS=no')
 
             networkctl_reload()
-            self.wait_online(['veth99:routable'])
+            self.wait_online('veth99:routable')
 
             # link becomes 'routable' when at least one protocol provide an valid address. Hence, we need to explicitly wait for both addresses.
             self.wait_address('veth99', r'inet 192.168.5.[0-9]*/24 metric 1024 brd 192.168.5.255 scope global dynamic', ipv='-4')
@@ -6411,7 +6831,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         copy_network_unit('25-veth.netdev', '25-dhcp-server-veth-peer.network', '25-dhcp-client.network', copy_dropins=False)
 
         start_networkd()
-        self.wait_online(['veth-peer:carrier'])
+        self.wait_online('veth-peer:carrier')
         start_dnsmasq('--dhcp-option=option:dns-server,192.168.5.1',
                       '--dhcp-option=option6:dns-server,[2600::1]')
 
@@ -6419,6 +6839,50 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         check(self, True, False)
         check(self, False, True)
         check(self, False, False)
+    
+    def test_dhcp_client_default_use_domains(self):        
+        def check(self, ipv4, ipv6):
+            mkdir_p(networkd_conf_dropin_dir)
+            with open(os.path.join(networkd_conf_dropin_dir, 'default_use_domains.conf'), mode='w', encoding='utf-8') as f:
+                f.write('[DHCPv4]\nUseDomains=')
+                f.write('yes\n' if ipv4 else 'no\n')
+                f.write('[DHCPv6]\nUseDomains=')
+                f.write('yes\n' if ipv6 else 'no\n')
+            
+            restart_networkd()
+            self.wait_online('veth-peer:carrier')
+            start_dnsmasq('--dhcp-option=option:dns-server,192.168.5.1',
+                          '--dhcp-option=option6:dns-server,[2600::1]',
+                          '--dhcp-option=option:domain-search,example.com',
+                          '--dhcp-option=option6:domain-search,example.com')
+
+            self.wait_online('veth99:routable')
+
+            # link becomes 'routable' when at least one protocol provide an valid address. Hence, we need to explicitly wait for both addresses.
+            self.wait_address('veth99', r'inet 192.168.5.[0-9]*/24 metric 1024 brd 192.168.5.255 scope global dynamic', ipv='-4')
+            self.wait_address('veth99', r'inet6 2600::[0-9a-f]*/128 scope global (dynamic noprefixroute|noprefixroute dynamic)', ipv='-6')
+
+            for _ in range(20):
+                output = resolvectl('domain', 'veth99')
+                if ipv4 or ipv6:
+                    if 'example.com' in output:
+                        break
+                else:
+                    if 'example.com' not in output:
+                        break
+                time.sleep(0.5)
+            else:
+                print(output)
+                self.fail('unexpected domain setting in resolved...')
+            
+            stop_dnsmasq()
+            remove_networkd_conf_dropin('default_use_domains.conf')
+
+        copy_network_unit('25-veth.netdev', '25-dhcp-server-veth-peer.network', '25-dhcp-client.network', copy_dropins=False)
+        check(self, True, True)
+        check(self, True, False)
+        check(self, False, True)
+        check(self, False, False)
 
     def test_dhcp_client_use_captive_portal(self):
         def check(self, ipv4, ipv6):
@@ -6431,7 +6895,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
                 f.write('\n[IPv6AcceptRA]\nUseCaptivePortal=no')
 
             networkctl_reload()
-            self.wait_online(['veth99:routable'])
+            self.wait_online('veth99:routable')
 
             # link becomes 'routable' when at least one protocol provide an valid address. Hence, we need to explicitly wait for both addresses.
             self.wait_address('veth99', r'inet 192.168.5.[0-9]*/24 metric 1024 brd 192.168.5.255 scope global dynamic', ipv='-4')
@@ -6449,7 +6913,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         copy_network_unit('25-veth.netdev', '25-dhcp-server-veth-peer.network', '25-dhcp-client.network', copy_dropins=False)
 
         start_networkd()
-        self.wait_online(['veth-peer:carrier'])
+        self.wait_online('veth-peer:carrier')
         start_dnsmasq('--dhcp-option=114,http://systemd.io',
                       '--dhcp-option=option6:103,http://systemd.io')
 
@@ -6469,7 +6933,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
                 f.write('\n[IPv6AcceptRA]\nUseCaptivePortal=no')
 
             networkctl_reload()
-            self.wait_online(['veth99:routable'])
+            self.wait_online('veth99:routable')
 
             # link becomes 'routable' when at least one protocol provide an valid address. Hence, we need to explicitly wait for both addresses.
             self.wait_address('veth99', r'inet 192.168.5.[0-9]*/24 metric 1024 brd 192.168.5.255 scope global dynamic', ipv='-4')
@@ -6485,7 +6949,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         copy_network_unit('25-veth.netdev', '25-dhcp-server-veth-peer.network', '25-dhcp-client.network', copy_dropins=False)
 
         start_networkd()
-        self.wait_online(['veth-peer:carrier'])
+        self.wait_online('veth-peer:carrier')
         masq = lambda bs: ':'.join(f'{b:02x}' for b in bs)
         start_dnsmasq('--dhcp-option=114,' + masq(b'http://\x00invalid/url'),
                       '--dhcp-option=option6:103,' + masq(b'http://\x00/invalid/url'))
@@ -6503,62 +6967,80 @@ class NetworkdDHCPPDTests(unittest.TestCase, Utilities):
     def tearDown(self):
         tear_down_common()
 
-    def test_dhcp6pd(self):
-        def get_dhcp6_prefix(link):
-            description = get_link_description(link)
+    def check_dhcp6_prefix(self, link):
+        description = get_link_description(link)
 
-            self.assertIn('DHCPv6Client', description.keys())
-            self.assertIn('Prefixes', description['DHCPv6Client'])
+        self.assertIn('DHCPv6Client', description.keys())
+        self.assertIn('Prefixes', description['DHCPv6Client'])
 
-            prefixInfo = description['DHCPv6Client']['Prefixes']
+        prefixInfo = description['DHCPv6Client']['Prefixes']
 
-            return prefixInfo
+        self.assertEqual(len(prefixInfo), 1)
 
-        copy_network_unit('25-veth.netdev', '25-dhcp6pd-server.network', '25-dhcp6pd-upstream.network',
-                          '25-veth-downstream-veth97.netdev', '25-dhcp-pd-downstream-veth97.network', '25-dhcp-pd-downstream-veth97-peer.network',
-                          '25-veth-downstream-veth98.netdev', '25-dhcp-pd-downstream-veth98.network', '25-dhcp-pd-downstream-veth98-peer.network',
-                          '11-dummy.netdev', '25-dhcp-pd-downstream-test1.network',
-                          '25-dhcp-pd-downstream-dummy97.network',
-                          '12-dummy.netdev', '25-dhcp-pd-downstream-dummy98.network',
-                          '13-dummy.netdev', '25-dhcp-pd-downstream-dummy99.network',
-                          copy_dropins=False)
+        self.assertIn('Prefix', prefixInfo[0].keys())
+        self.assertIn('PrefixLength', prefixInfo[0].keys())
+        self.assertIn('PreferredLifetimeUSec', prefixInfo[0].keys())
+        self.assertIn('ValidLifetimeUSec', prefixInfo[0].keys())
 
-        self.setup_nftset('addr6', 'ipv6_addr')
-        self.setup_nftset('network6', 'ipv6_addr', 'flags interval;')
-        self.setup_nftset('ifindex', 'iface_index')
+        self.assertEqual(prefixInfo[0]['Prefix'][0:6], [63, 254, 5, 1, 255, 255])
+        self.assertEqual(prefixInfo[0]['PrefixLength'], 56)
+        self.assertGreater(prefixInfo[0]['PreferredLifetimeUSec'], 0)
+        self.assertGreater(prefixInfo[0]['ValidLifetimeUSec'], 0)
+
+    def test_dhcp6pd_no_address(self):
+        # For issue #29979.
+        copy_network_unit('25-veth.netdev', '25-dhcp6pd-server.network', '25-dhcp6pd-upstream-no-address.network')
 
         start_networkd()
-        self.wait_online(['veth-peer:routable'])
+        self.wait_online('veth-peer:routable')
         start_isc_dhcpd(conf_file='isc-dhcpd-dhcp6pd.conf', ipv='-6')
-        self.wait_online(['veth99:degraded'])
+        self.wait_online('veth99:degraded')
 
-        # First, test UseAddress=no and Assign=no (issue #29979).
-        # Note, due to the bug #29701, this test must be done at first.
         print('### ip -6 address show dev veth99 scope global')
         output = check_output('ip -6 address show dev veth99 scope global')
         print(output)
         self.assertNotIn('inet6 3ffe:501:ffff', output)
 
-        # Check DBus assigned prefix information to veth99
-        prefixInfo = get_dhcp6_prefix('veth99')
+        self.check_dhcp6_prefix('veth99')
 
-        self.assertEqual(len(prefixInfo), 1)
-        prefixInfo = prefixInfo[0]
+    def test_dhcp6pd_no_assign(self):
+        # Similar to test_dhcp6pd_no_assign(), but in this case UseAddress=yes (default),
+        # However, the server does not provide IA_NA. For issue #31349.
+        copy_network_unit('25-veth.netdev', '25-dhcp6pd-server.network', '25-dhcp6pd-upstream-no-assign.network')
 
-        self.assertIn('Prefix', prefixInfo.keys())
-        self.assertIn('PrefixLength', prefixInfo.keys())
-        self.assertIn('PreferredLifetimeUSec', prefixInfo.keys())
-        self.assertIn('ValidLifetimeUSec', prefixInfo.keys())
+        start_networkd()
+        self.wait_online('veth-peer:routable')
+        start_isc_dhcpd(conf_file='isc-dhcpd-dhcp6pd-no-range.conf', ipv='-6')
+        self.wait_online('veth99:degraded')
 
-        self.assertEqual(prefixInfo['Prefix'][0:6], [63, 254, 5, 1, 255, 255])
-        self.assertEqual(prefixInfo['PrefixLength'], 56)
-        self.assertGreater(prefixInfo['PreferredLifetimeUSec'], 0)
-        self.assertGreater(prefixInfo['ValidLifetimeUSec'], 0)
+        print('### ip -6 address show dev veth99 scope global')
+        output = check_output('ip -6 address show dev veth99 scope global')
+        print(output)
+        self.assertNotIn('inet6 3ffe:501:ffff', output)
 
-        copy_network_unit('25-dhcp6pd-upstream.network.d/with-address.conf')
-        networkctl_reload()
-        self.wait_online(['veth99:routable', 'test1:routable', 'dummy98:routable', 'dummy99:degraded',
-                          'veth97:routable', 'veth97-peer:routable', 'veth98:routable', 'veth98-peer:routable'])
+        self.check_dhcp6_prefix('veth99')
+
+    def test_dhcp6pd(self):
+        copy_network_unit('25-veth.netdev', '25-dhcp6pd-server.network', '25-dhcp6pd-upstream.network',
+                          '25-veth-downstream-veth97.netdev', '25-dhcp-pd-downstream-veth97.network', '25-dhcp-pd-downstream-veth97-peer.network',
+                          '25-veth-downstream-veth98.netdev', '25-dhcp-pd-downstream-veth98.network', '25-dhcp-pd-downstream-veth98-peer.network',
+                          '11-dummy.netdev', '25-dhcp-pd-downstream-test1.network',
+                          '25-dhcp-pd-downstream-dummy97.network',
+                          '12-dummy.netdev', '25-dhcp-pd-downstream-dummy98.network',
+                          '13-dummy.netdev', '25-dhcp-pd-downstream-dummy99.network')
+
+        start_networkd()
+        self.wait_online('veth-peer:routable')
+        start_isc_dhcpd(conf_file='isc-dhcpd-dhcp6pd.conf', ipv='-6')
+        self.wait_online('veth99:routable', 'test1:routable', 'dummy98:routable', 'dummy99:degraded',
+                         'veth97:routable', 'veth97-peer:routable', 'veth98:routable', 'veth98-peer:routable')
+
+        self.setup_nftset('addr6', 'ipv6_addr')
+        self.setup_nftset('network6', 'ipv6_addr', 'flags interval;')
+        self.setup_nftset('ifindex', 'iface_index')
+
+        # Check DBus assigned prefix information to veth99
+        self.check_dhcp6_prefix('veth99')
 
         print('### ip -6 address show dev veth-peer scope global')
         output = check_output('ip -6 address show dev veth-peer scope global')
@@ -6696,7 +7178,7 @@ class NetworkdDHCPPDTests(unittest.TestCase, Utilities):
 
         # Test case for a downstream which appears later
         check_output('ip link add dummy97 type dummy')
-        self.wait_online(['dummy97:routable'])
+        self.wait_online('dummy97:routable')
 
         print('### ip -6 address show dev dummy97 scope global')
         output = check_output('ip -6 address show dev dummy97 scope global')
@@ -6713,7 +7195,7 @@ class NetworkdDHCPPDTests(unittest.TestCase, Utilities):
 
         # Test case for reconfigure
         networkctl_reconfigure('dummy98', 'dummy99')
-        self.wait_online(['dummy98:routable', 'dummy99:degraded'])
+        self.wait_online('dummy98:routable', 'dummy99:degraded')
 
         print('### ip -6 address show dev dummy98 scope global')
         output = check_output('ip -6 address show dev dummy98 scope global')
@@ -6952,7 +7434,7 @@ class NetworkdDHCPPDTests(unittest.TestCase, Utilities):
                           '80-6rd-tunnel.network')
 
         start_networkd()
-        self.wait_online(['veth-peer:routable'])
+        self.wait_online('veth-peer:routable')
 
         # ipv4masklen: 8
         # 6rd-prefix: 2001:db8::/32
@@ -6961,8 +7443,8 @@ class NetworkdDHCPPDTests(unittest.TestCase, Utilities):
         start_dnsmasq('--dhcp-option=212,08:20:20:01:0d:b8:00:00:00:00:00:00:00:00:00:00:00:00:0a:00:00:01',
                       ipv4_range='10.100.100.100,10.100.100.200',
                       ipv4_router='10.0.0.1')
-        self.wait_online(['veth99:routable', 'test1:routable', 'dummy98:routable', 'dummy99:degraded',
-                          'veth97:routable', 'veth97-peer:routable', 'veth98:routable', 'veth98-peer:routable'])
+        self.wait_online('veth99:routable', 'test1:routable', 'dummy98:routable', 'dummy99:degraded',
+                         'veth97:routable', 'veth97-peer:routable', 'veth98:routable', 'veth98-peer:routable')
 
         # Check the DBus interface for assigned prefix information
         prefixInfo = get_dhcp_6rd_prefix('veth99')
@@ -6974,7 +7456,7 @@ class NetworkdDHCPPDTests(unittest.TestCase, Utilities):
 
         # Test case for a downstream which appears later
         check_output('ip link add dummy97 type dummy')
-        self.wait_online(['dummy97:routable'])
+        self.wait_online('dummy97:routable')
 
         # Find tunnel name
         tunnel_name = None
@@ -6983,21 +7465,21 @@ class NetworkdDHCPPDTests(unittest.TestCase, Utilities):
                 tunnel_name = name
                 break
 
-        self.wait_online([f'{tunnel_name}:routable'])
+        self.wait_online(f'{tunnel_name}:routable')
 
         self.verify_dhcp4_6rd(tunnel_name)
 
         # Test case for reconfigure
         networkctl_reconfigure('dummy98', 'dummy99')
-        self.wait_online(['dummy98:routable', 'dummy99:degraded'])
+        self.wait_online('dummy98:routable', 'dummy99:degraded')
 
         self.verify_dhcp4_6rd(tunnel_name)
 
         print('Wait for the DHCP lease to be renewed/rebind')
         time.sleep(120)
 
-        self.wait_online(['veth99:routable', 'test1:routable', 'dummy97:routable', 'dummy98:routable', 'dummy99:degraded',
-                          'veth97:routable', 'veth97-peer:routable', 'veth98:routable', 'veth98-peer:routable'])
+        self.wait_online('veth99:routable', 'test1:routable', 'dummy97:routable', 'dummy98:routable', 'dummy99:degraded',
+                         'veth97:routable', 'veth97-peer:routable', 'veth98:routable', 'veth98-peer:routable')
 
         self.verify_dhcp4_6rd(tunnel_name)
 
@@ -7014,7 +7496,7 @@ class NetworkdIPv6PrefixTests(unittest.TestCase, Utilities):
                           '12-dummy.netdev', '25-ipv6ra-uplink.network')
 
         start_networkd()
-        self.wait_online(['veth99:routable', 'veth-peer:routable', 'dummy98:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable', 'dummy98:routable')
 
         output = check_output('ip address show dev veth-peer')
         print(output)
@@ -7065,7 +7547,7 @@ class NetworkdIPv6PrefixTests(unittest.TestCase, Utilities):
                           '12-dummy.netdev', '25-ipv6ra-uplink.network')
 
         start_networkd()
-        self.wait_online(['veth99:routable', 'veth-peer:routable', 'dummy98:routable'])
+        self.wait_online('veth99:routable', 'veth-peer:routable', 'dummy98:routable')
 
         output = check_output('ip address show dev veth-peer')
         print(output)
@@ -7106,13 +7588,13 @@ class NetworkdMTUTests(unittest.TestCase, Utilities):
 
         # test normal start
         start_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
         self.check_link_attr('dummy98', 'mtu', mtu)
         self.check_ipv6_sysctl_attr('dummy98', 'mtu', ipv6_mtu)
 
         # test normal restart
         restart_networkd()
-        self.wait_online(['dummy98:routable'])
+        self.wait_online('dummy98:routable')
         self.check_link_attr('dummy98', 'mtu', mtu)
         self.check_ipv6_sysctl_attr('dummy98', 'mtu', ipv6_mtu)
 
@@ -7175,15 +7657,6 @@ if __name__ == '__main__':
     parser = argparse.ArgumentParser()
     parser.add_argument('--build-dir', help='Path to build dir', dest='build_dir')
     parser.add_argument('--source-dir', help='Path to source dir/git tree', dest='source_dir')
-    parser.add_argument('--networkd', help='Path to systemd-networkd', dest='networkd_bin')
-    parser.add_argument('--resolved', help='Path to systemd-resolved', dest='resolved_bin')
-    parser.add_argument('--timesyncd', help='Path to systemd-timesyncd', dest='timesyncd_bin')
-    parser.add_argument('--udevd', help='Path to systemd-udevd', dest='udevd_bin')
-    parser.add_argument('--wait-online', help='Path to systemd-networkd-wait-online', dest='wait_online_bin')
-    parser.add_argument('--networkctl', help='Path to networkctl', dest='networkctl_bin')
-    parser.add_argument('--resolvectl', help='Path to resolvectl', dest='resolvectl_bin')
-    parser.add_argument('--timedatectl', help='Path to timedatectl', dest='timedatectl_bin')
-    parser.add_argument('--udevadm', help='Path to udevadm', dest='udevadm_bin')
     parser.add_argument('--valgrind', help='Enable valgrind', dest='use_valgrind', type=bool, nargs='?', const=True, default=use_valgrind)
     parser.add_argument('--debug', help='Generate debugging logs', dest='enable_debug', type=bool, nargs='?', const=True, default=enable_debug)
     parser.add_argument('--asan-options', help='ASAN options', dest='asan_options')
@@ -7193,45 +7666,21 @@ if __name__ == '__main__':
     ns, unknown_args = parser.parse_known_args(namespace=unittest)
 
     if ns.build_dir:
-        if ns.networkd_bin or ns.resolved_bin or ns.timesyncd_bin or ns.udevd_bin or \
-           ns.wait_online_bin or ns.networkctl_bin or ns.resolvectl_bin or ns.timedatectl_bin or ns.udevadm_bin:
-            print('WARNING: --networkd, --resolved, --timesyncd, --udevd, --wait-online, --networkctl, --resolvectl, --timedatectl, or --udevadm options are ignored when --build-dir is specified.')
         networkd_bin = os.path.join(ns.build_dir, 'systemd-networkd')
         resolved_bin = os.path.join(ns.build_dir, 'systemd-resolved')
         timesyncd_bin = os.path.join(ns.build_dir, 'systemd-timesyncd')
-        udevd_bin = os.path.join(ns.build_dir, 'udevadm')
         wait_online_bin = os.path.join(ns.build_dir, 'systemd-networkd-wait-online')
         networkctl_bin = os.path.join(ns.build_dir, 'networkctl')
         resolvectl_bin = os.path.join(ns.build_dir, 'resolvectl')
         timedatectl_bin = os.path.join(ns.build_dir, 'timedatectl')
         udevadm_bin = os.path.join(ns.build_dir, 'udevadm')
-        systemd_udev_rules_build_dir = os.path.join(ns.build_dir, 'rules.d')
-    else:
-        if ns.networkd_bin:
-            networkd_bin = ns.networkd_bin
-        if ns.resolved_bin:
-            resolved_bin = ns.resolved_bin
-        if ns.timesyncd_bin:
-            timesyncd_bin = ns.timesyncd_bin
-        if ns.udevd_bin:
-            udevd_bin = ns.udevd_bin
-        if ns.wait_online_bin:
-            wait_online_bin = ns.wait_online_bin
-        if ns.networkctl_bin:
-            networkctl_bin = ns.networkctl_bin
-        if ns.resolvectl_bin:
-            resolvectl_bin = ns.resolvectl_bin
-        if ns.timedatectl_bin:
-            timedatectl_bin = ns.timedatectl_bin
-        if ns.udevadm_bin:
-            udevadm_bin = ns.udevadm_bin
+        build_dir = ns.build_dir
 
     if ns.source_dir:
-        systemd_source_dir = ns.source_dir
+        source_dir = ns.source_dir
     else:
-        systemd_source_dir = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../"))
-    if not os.path.exists(os.path.join(systemd_source_dir, "meson_options.txt")):
-        raise RuntimeError(f"{systemd_source_dir} doesn't appear to be a systemd source tree")
+        source_dir = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../"))
+    assert os.path.exists(os.path.join(source_dir, "meson_options.txt")), f"{source_dir} doesn't appear to be a systemd source tree."
 
     use_valgrind = ns.use_valgrind
     enable_debug = ns.enable_debug
@@ -7250,6 +7699,11 @@ if __name__ == '__main__':
     udevadm_cmd = valgrind_cmd.split() + [udevadm_bin]
     wait_online_cmd = valgrind_cmd.split() + [wait_online_bin]
 
+    if build_dir:
+        test_ndisc_send = os.path.normpath(os.path.join(build_dir, 'test-ndisc-send'))
+    else:
+        test_ndisc_send = '/usr/lib/tests/test-ndisc-send'
+
     if asan_options:
         env.update({'ASAN_OPTIONS': asan_options})
     if lsan_options: