From: Luca Boccassi Date: Mon, 31 Oct 2022 19:59:36 +0000 (+0100) Subject: Merge pull request #25166 from yuwata/network-router-preference X-Git-Tag: v253-rc1~640 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4b9cfe08bafe24f685b153b89e7bd8d94eebec56;p=thirdparty%2Fsystemd.git Merge pull request #25166 from yuwata/network-router-preference network: adjust route metric based on router preference --- 4b9cfe08bafe24f685b153b89e7bd8d94eebec56 diff --cc test/test-network/systemd-networkd-tests.py index 87710ef3fb6,64924a35aa5..de339894afe --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@@ -907,13 -889,23 +907,23 @@@ class Utilities() self.assertNotRegex(output, address_regex) + def wait_route(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 re.search(route_regex, output): + break + + self.assertRegex(output, route_regex) + def check_netlabel(self, interface, address, label='system_u:object_r:root_t:s0'): if not shutil.which('selinuxenabled'): - print(f'## Checking NetLabel skipped: selinuxenabled command not found.') + print('## Checking NetLabel skipped: selinuxenabled command not found.') elif call_quiet('selinuxenabled') != 0: - print(f'## Checking NetLabel skipped: SELinux disabled.') + print('## Checking NetLabel skipped: SELinux disabled.') elif not shutil.which('netlabelctl'): # not packaged by all distros - print(f'## Checking NetLabel skipped: netlabelctl command not found.') + print('## Checking NetLabel skipped: netlabelctl command not found.') else: output = check_output('netlabelctl unlbl list') print(output)