diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-08-01 14:38:05 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-09-02 07:12:49 +0200 |
commit | 21d9eeb5e6177544b32a5e25c355373573a3ccee (patch) | |
tree | 3e9e88f75cba0e48d4bc2a2e741d1f7a732e0b89 /test/test-network | |
parent | network/tclass: do not save tclass to Link before it is configured (diff) | |
download | systemd-21d9eeb5e6177544b32a5e25c355373573a3ccee.tar.xz systemd-21d9eeb5e6177544b32a5e25c355373573a3ccee.zip |
networkd: Replace existing objects instead of doing nothing if they exist
Currently, if for example a traffic control object already exist, networkd
will silently do nothing, even if the settings in the network file for the
traffic control object have changed. Let's instead replace the object if it
already exists so that new settings from the network file are applied as
expected.
Fixes #31226
Diffstat (limited to 'test/test-network')
-rwxr-xr-x | test/test-network/systemd-networkd-tests.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 8a2c5af398..1b61038d09 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -4489,6 +4489,17 @@ class NetworkdTCTests(unittest.TestCase, Utilities): self.assertIn('rtt 1s', output) self.assertIn('ack-filter-aggressive', output) + # Test for replacing existing qdisc. See #31226. + with open(os.path.join(network_unit_dir, '25-qdisc-cake.network'), mode='a', encoding='utf-8') as f: + f.write('Bandwidth=250M\n') + + networkctl_reload() + self.wait_online('dummy98:routable') + + output = check_output('tc qdisc show dev dummy98') + print(output) + self.assertIn('bandwidth 250Mbit', output) + @expectedFailureIfModuleIsNotAvailable('sch_codel') def test_qdisc_codel(self): copy_network_unit('25-qdisc-codel.network', '12-dummy.netdev') |