From: Yu Watanabe Date: Tue, 20 Aug 2024 11:56:35 +0000 (+0900) Subject: test-network: do not pass '[detached]' to 'ip rule del' X-Git-Tag: v257-rc1~669^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=936dec4337db67c5d3cfbb8e6b8d73fa1c5bd27f;p=thirdparty%2Fsystemd.git test-network: do not pass '[detached]' to 'ip rule del' That indicates the interface name in 'iif' or 'oif' cannot be resolved when 'ip rule' command is invoked. That's natural when networkd fail to remove rule but the corresponding interface is already removed. To make not the residual rules interfere subsequent test cases, let's ignore the flag and actually remove unwanted rules. --- diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 3a30c8bfd19..c88f75b4888 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -645,7 +645,7 @@ def flush_routing_policy_rules(): have = True print(f'### Removing IPv{ipv} routing policy rules that did not exist when the test started.') print(f'# {line}') - words = line.replace('lookup [l3mdev-table]', 'l3mdev').split() + words = line.replace('lookup [l3mdev-table]', 'l3mdev').replace('[detached]', '').split() priority = words[0].rstrip(':') call(f'ip -{ipv} rule del priority {priority} ' + ' '.join(words[1:]))