Skip to content

Commit eea63c0

Browse files
authored
Merge pull request systemd#16808 from yuwata/test-network-reconfigure-routing-policy-rules
add a test case for [RoutingPolicyRule] and fix minor issue in man page
2 parents e2f116a + d91b9bb commit eea63c0

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

man/networkd.conf.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
<term><varname>SpeedMeter=</varname></term>
5353
<listitem><para>Takes a boolean. If set to yes, then <command>systemd-networkd</command>
5454
measures the traffic of each interface, and
55-
<command>networkctl status <replaceable>INTERFACE</replaceable> shows the measured speed.
56-
</command>Defaults to no.</para></listitem>
55+
<command>networkctl status <replaceable>INTERFACE</replaceable></command> shows the measured speed.
56+
Defaults to no.</para></listitem>
5757
</varlistentry>
5858

5959
<varlistentry>

test/test-network/systemd-networkd-tests.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1976,6 +1976,25 @@ def test_routing_policy_rule(self):
19761976
self.assertRegex(output, 'iif test1')
19771977
self.assertRegex(output, 'lookup 9')
19781978

1979+
run('ip rule delete iif test1 priority 111')
1980+
1981+
output = check_output('ip rule list iif test1 priority 111')
1982+
print(output)
1983+
self.assertEqual(output, '')
1984+
1985+
run(*networkctl_cmd, 'reconfigure', 'test1', env=env)
1986+
1987+
self.wait_online(['test1:degraded'])
1988+
1989+
output = check_output('ip rule list iif test1 priority 111')
1990+
print(output)
1991+
self.assertRegex(output, '111:')
1992+
self.assertRegex(output, 'from 192.168.100.18')
1993+
self.assertRegex(output, r'tos (0x08|throughput)\s')
1994+
self.assertRegex(output, 'iif test1')
1995+
self.assertRegex(output, 'oif test1')
1996+
self.assertRegex(output, 'lookup 7')
1997+
19791998
def test_routing_policy_rule_issue_11280(self):
19801999
copy_unit_to_networkd_unit_path('routing-policy-rule-test1.network', '11-dummy.netdev',
19812000
'routing-policy-rule-dummy98.network', '12-dummy.netdev')

0 commit comments

Comments
 (0)