diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-04-13 02:02:01 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-04-13 02:39:55 +0200 |
commit | e6fa91195bbe225e89d31338542455a6af10fb89 (patch) | |
tree | a12297344f49cd1d73bde563ac5f73463e55b8e5 /test/test-network | |
parent | network/tc: fix stack overflow when dropping tclass or qdisc (diff) | |
download | systemd-e6fa91195bbe225e89d31338542455a6af10fb89.tar.xz systemd-e6fa91195bbe225e89d31338542455a6af10fb89.zip |
test-network: add test for stack overflow in qdisc_drop() and tclass_drop()
Diffstat (limited to 'test/test-network')
-rwxr-xr-x | test/test-network/systemd-networkd-tests.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 0c12c43291..d83621dbf4 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -4623,6 +4623,23 @@ class NetworkdTCTests(unittest.TestCase, Utilities): print(output) self.assertRegex(output, 'qdisc teql1 31: root') + @expectedFailureIfModuleIsNotAvailable('sch_fq', 'sch_sfq', 'sch_tbf') + def test_qdisc_drop(self): + copy_network_unit('12-dummy.netdev', '12-dummy.network') + start_networkd() + self.wait_online('dummy98:routable') + + # Test case for issue #32247 and #32254. + for _ in range(20): + check_output('tc qdisc replace dev dummy98 root fq') + self.assertFalse(networkd_is_failed()) + check_output('tc qdisc replace dev dummy98 root fq pacing') + self.assertFalse(networkd_is_failed()) + check_output('tc qdisc replace dev dummy98 handle 10: root tbf rate 0.5mbit burst 5kb latency 70ms peakrate 1mbit minburst 1540') + self.assertFalse(networkd_is_failed()) + check_output('tc qdisc add dev dummy98 parent 10:1 handle 100: sfq') + self.assertFalse(networkd_is_failed()) + class NetworkdStateFileTests(unittest.TestCase, Utilities): def setUp(self): |