[26-06-22 06:41:18] START switch_ratelimit scenario: cases/switch_ratelimit.sh header : verify ratelimit add-update-remove and tc state topology: sw1 192.60.0.1 | bridge device hi-example | OpenVPN tcp/1194, tun1194, 10.60.0.0/24 | rate limits are applied to bridge and OpenVPN devices topology: # Topology: topology: # - Diagram: topology: # sw1 192.60.0.1 topology: # | bridge device hi-example topology: # ^ topology: # | OpenVPN tcp/1194, tun1194, 10.60.0.0/24 topology: # rate limits are applied to bridge and OpenVPN devices topology: # - Docker mgmt network: 100.100.0.0/24 topology: # sw1=100.100.0.241. topology: # - OpenLAN service network "example": 192.60.0.0/24 topology: # sw1=192.60.0.1. topology: # - OpenVPN overlay: topology: # tcp/1194, subnet 10.60.0.0/24. topology: # Validation: topology: # devices, and verify Linux tc qdisc/filter state is updated. Started switch pause container: tests-sw-ratelimit-pause Started switch frr container: tests-sw-ratelimit-frr Started switch ipsec container: tests-sw-ratelimit-ipsec Started switch container: tests-sw-ratelimit [26-06-22 06:41:19][ASSERT#0001][expect] at cases/switch_ratelimit.sh:52 fn=setup_sw1 retry=30 cmd="docker logs -f tests-sw-ratelimit" expect="Http.Start" 2026/06/22 06:41:20 INFO|root|Wait: ... 2026/06/22 06:41:20 INFO|root|UdpServer.Listen: udp://0.0.0.0:10002 2026/06/22 06:41:20 INFO|root|TcpServer.Listen: tcp://0.0.0.0:10002 2026/06/22 06:41:20 INFO|root|Http.Start 0.0.0.0:10000 [26-06-22 06:41:20][ASSERT#0001][OK] cost=1.030s [26-06-22 06:41:20][ASSERT#0002][cmd] at cases/switch_ratelimit.sh:54 fn=setup_sw1 cmd="docker exec tests-sw-ratelimit openlan network --name example add --address 192.60.0.1/24" [26-06-22 06:41:20][ASSERT#0002][OK] cost=0.256s [26-06-22 06:41:20][ASSERT#0003][cmd] at cases/switch_ratelimit.sh:55 fn=setup_sw1 cmd="docker exec tests-sw-ratelimit ip link show hi-example" 8: hi-example@bi-example: mtu 1500 qdisc noqueue state UP mode DEFAULT group default link/ether 5e:73:0b:95:dc:93 brd ff:ff:ff:ff:ff:ff [26-06-22 06:41:20][ASSERT#0003][OK] cost=0.051s [26-06-22 06:41:20][ASSERT#0004][cmd] at cases/switch_ratelimit.sh:57 fn=setup_sw1 cmd="docker exec tests-sw-ratelimit openlan network --name example openvpn add --listen :1194 --protocol tcp --subnet 10.60.0.0/24 --dns 8.8.8.8" [26-06-22 06:41:20][ASSERT#0004][OK] cost=0.124s [26-06-22 06:41:20][ASSERT#0005][match] at cases/switch_ratelimit.sh:58 fn=setup_sw1 retry=20 cmd="docker exec tests-sw-ratelimit ip link show tun1194" expect="tun1194" 9: tun1194: mtu 1500 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 500 link/none [26-06-22 06:41:20][ASSERT#0005][OK] cost=0.060s [26-06-22 06:41:20][ASSERT#0006][cmd] at cases/switch_ratelimit.sh:64 fn=test_ratelimit_add cmd="docker exec tests-sw-ratelimit openlan ratelimit add --device hi-example --speed 1" [26-06-22 06:41:20][ASSERT#0006][OK] cost=0.065s [26-06-22 06:41:20][ASSERT#0007][match] at cases/switch_ratelimit.sh:66 fn=test_ratelimit_add retry=10 cmd="docker exec tests-sw-ratelimit tc qdisc show dev hi-example" expect="rate 1Mbit" qdisc tbf 805f: root refcnt 13 rate 1Mbit burst 64Kb lat 400ms qdisc ingress ffff: parent ffff:fff1 ---------------- [26-06-22 06:41:21][ASSERT#0007][OK] cost=0.065s [26-06-22 06:41:21][ASSERT#0008][match] at cases/switch_ratelimit.sh:67 fn=test_ratelimit_add retry=10 cmd="docker exec tests-sw-ratelimit tc filter show dev hi-example parent ffff:" expect="rate 1Mbit" filter protocol ip pref 1 u32 chain 0 fh 800: ht divisor 1 filter protocol ip pref 1 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid :1 not_in_hw match 00000000/00000000 at 0 police 0x1 rate 1Mbit burst 64Kb mtu 2Kb action drop overhead 0b ref 1 bind 1 [26-06-22 06:41:21][ASSERT#0008][OK] cost=0.059s [26-06-22 06:41:21][ASSERT#0009][cmd] at cases/switch_ratelimit.sh:69 fn=test_ratelimit_add cmd="docker exec tests-sw-ratelimit openlan ratelimit add --device hi-example --speed 2" [26-06-22 06:41:21][ASSERT#0009][OK] cost=0.080s [26-06-22 06:41:21][ASSERT#0010][match] at cases/switch_ratelimit.sh:71 fn=test_ratelimit_add retry=10 cmd="docker exec tests-sw-ratelimit tc qdisc show dev hi-example" expect="rate 2Mbit" qdisc tbf 8060: root refcnt 13 rate 2Mbit burst 64Kb lat 400ms qdisc ingress ffff: parent ffff:fff1 ---------------- [26-06-22 06:41:21][ASSERT#0010][OK] cost=0.057s [26-06-22 06:41:21][ASSERT#0011][match] at cases/switch_ratelimit.sh:72 fn=test_ratelimit_add retry=10 cmd="docker exec tests-sw-ratelimit tc filter show dev hi-example parent ffff:" expect="rate 2Mbit" filter protocol ip pref 1 u32 chain 0 fh 800: ht divisor 1 filter protocol ip pref 1 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid :1 not_in_hw match 00000000/00000000 at 0 police 0x2 rate 2Mbit burst 64Kb mtu 2Kb action drop overhead 0b ref 1 bind 1 [26-06-22 06:41:21][ASSERT#0011][OK] cost=0.061s [26-06-22 06:41:21][ASSERT#0012][unmatch] at cases/switch_ratelimit.sh:74 fn=test_ratelimit_add retry=3 cmd="docker exec tests-sw-ratelimit tc qdisc show dev hi-example" unexpected="rate 1Mbit" Last output: qdisc tbf 8060: root refcnt 13 rate 2Mbit burst 64Kb lat 400ms qdisc ingress ffff: parent ffff:fff1 ---------------- [26-06-22 06:41:24][ASSERT#0012][OK] cost=3.181s [26-06-22 06:41:24][ASSERT#0013][unmatch] at cases/switch_ratelimit.sh:75 fn=test_ratelimit_add retry=3 cmd="docker exec tests-sw-ratelimit tc filter show dev hi-example parent ffff:" unexpected="rate 1Mbit" Last output: filter protocol ip pref 1 u32 chain 0 filter protocol ip pref 1 u32 chain 0 fh 800: ht divisor 1 filter protocol ip pref 1 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid :1 not_in_hw match 00000000/00000000 at 0 police 0x2 rate 2Mbit burst 64Kb mtu 2Kb action drop overhead 0b ref 1 bind 1 [26-06-22 06:41:27][ASSERT#0013][OK] cost=3.184s [26-06-22 06:41:27][ASSERT#0014][cmd] at cases/switch_ratelimit.sh:81 fn=test_ratelimit_remove cmd="docker exec tests-sw-ratelimit openlan ratelimit remove --device hi-example" [26-06-22 06:41:27][ASSERT#0014][OK] cost=0.066s [26-06-22 06:41:27][ASSERT#0015][unmatch] at cases/switch_ratelimit.sh:83 fn=test_ratelimit_remove retry=3 cmd="docker exec tests-sw-ratelimit tc qdisc show dev hi-example" unexpected="tbf" Last output: qdisc noqueue 0: root refcnt 2 [26-06-22 06:41:30][ASSERT#0015][OK] cost=3.189s [26-06-22 06:41:30][ASSERT#0016][unmatch] at cases/switch_ratelimit.sh:84 fn=test_ratelimit_remove retry=3 cmd="docker exec tests-sw-ratelimit tc qdisc show dev hi-example" unexpected="ingress" Last output: qdisc noqueue 0: root refcnt 2 [26-06-22 06:41:34][ASSERT#0016][OK] cost=3.193s [26-06-22 06:41:34][ASSERT#0017][cmd] at cases/switch_ratelimit.sh:64 fn=test_ratelimit_add cmd="docker exec tests-sw-ratelimit openlan ratelimit add --device tun1194 --speed 1" [26-06-22 06:41:34][ASSERT#0017][OK] cost=0.079s [26-06-22 06:41:34][ASSERT#0018][match] at cases/switch_ratelimit.sh:66 fn=test_ratelimit_add retry=10 cmd="docker exec tests-sw-ratelimit tc qdisc show dev tun1194" expect="rate 1Mbit" qdisc tbf 8061: root refcnt 2 rate 1Mbit burst 64Kb lat 400ms qdisc ingress ffff: parent ffff:fff1 ---------------- [26-06-22 06:41:34][ASSERT#0018][OK] cost=0.057s [26-06-22 06:41:34][ASSERT#0019][match] at cases/switch_ratelimit.sh:67 fn=test_ratelimit_add retry=10 cmd="docker exec tests-sw-ratelimit tc filter show dev tun1194 parent ffff:" expect="rate 1Mbit" filter protocol ip pref 1 u32 chain 0 fh 800: ht divisor 1 filter protocol ip pref 1 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid :1 not_in_hw match 00000000/00000000 at 0 police 0x1 rate 1Mbit burst 64Kb mtu 2Kb action drop overhead 0b ref 1 bind 1 [26-06-22 06:41:34][ASSERT#0019][OK] cost=0.056s [26-06-22 06:41:34][ASSERT#0020][cmd] at cases/switch_ratelimit.sh:69 fn=test_ratelimit_add cmd="docker exec tests-sw-ratelimit openlan ratelimit add --device tun1194 --speed 2" [26-06-22 06:41:34][ASSERT#0020][OK] cost=0.088s [26-06-22 06:41:34][ASSERT#0021][match] at cases/switch_ratelimit.sh:71 fn=test_ratelimit_add retry=10 cmd="docker exec tests-sw-ratelimit tc qdisc show dev tun1194" expect="rate 2Mbit" qdisc tbf 8062: root refcnt 2 rate 2Mbit burst 64Kb lat 400ms qdisc ingress ffff: parent ffff:fff1 ---------------- [26-06-22 06:41:34][ASSERT#0021][OK] cost=0.062s [26-06-22 06:41:34][ASSERT#0022][match] at cases/switch_ratelimit.sh:72 fn=test_ratelimit_add retry=10 cmd="docker exec tests-sw-ratelimit tc filter show dev tun1194 parent ffff:" expect="rate 2Mbit" filter protocol ip pref 1 u32 chain 0 fh 800: ht divisor 1 filter protocol ip pref 1 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid :1 not_in_hw match 00000000/00000000 at 0 police 0x2 rate 2Mbit burst 64Kb mtu 2Kb action drop overhead 0b ref 1 bind 1 [26-06-22 06:41:34][ASSERT#0022][OK] cost=0.059s [26-06-22 06:41:34][ASSERT#0023][unmatch] at cases/switch_ratelimit.sh:74 fn=test_ratelimit_add retry=3 cmd="docker exec tests-sw-ratelimit tc qdisc show dev tun1194" unexpected="rate 1Mbit" Last output: qdisc tbf 8062: root refcnt 2 rate 2Mbit burst 64Kb lat 400ms qdisc ingress ffff: parent ffff:fff1 ---------------- [26-06-22 06:41:37][ASSERT#0023][OK] cost=3.187s [26-06-22 06:41:37][ASSERT#0024][unmatch] at cases/switch_ratelimit.sh:75 fn=test_ratelimit_add retry=3 cmd="docker exec tests-sw-ratelimit tc filter show dev tun1194 parent ffff:" unexpected="rate 1Mbit" Last output: filter protocol ip pref 1 u32 chain 0 filter protocol ip pref 1 u32 chain 0 fh 800: ht divisor 1 filter protocol ip pref 1 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid :1 not_in_hw match 00000000/00000000 at 0 police 0x2 rate 2Mbit burst 64Kb mtu 2Kb action drop overhead 0b ref 1 bind 1 [26-06-22 06:41:41][ASSERT#0024][OK] cost=3.176s [26-06-22 06:41:41][ASSERT#0025][cmd] at cases/switch_ratelimit.sh:81 fn=test_ratelimit_remove cmd="docker exec tests-sw-ratelimit openlan ratelimit remove --device tun1194" [26-06-22 06:41:41][ASSERT#0025][OK] cost=0.070s [26-06-22 06:41:41][ASSERT#0026][unmatch] at cases/switch_ratelimit.sh:83 fn=test_ratelimit_remove retry=3 cmd="docker exec tests-sw-ratelimit tc qdisc show dev tun1194" unexpected="tbf" Last output: qdisc fq_codel 0: root refcnt 2 limit 10240p flows 1024 quantum 1500 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 [26-06-22 06:41:44][ASSERT#0026][OK] cost=3.197s [26-06-22 06:41:44][ASSERT#0027][unmatch] at cases/switch_ratelimit.sh:84 fn=test_ratelimit_remove retry=3 cmd="docker exec tests-sw-ratelimit tc qdisc show dev tun1194" unexpected="ingress" Last output: qdisc fq_codel 0: root refcnt 2 limit 10240p flows 1024 quantum 1500 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 [26-06-22 06:41:47][ASSERT#0027][OK] cost=3.197s [26-06-22 06:41:47] END switch_ratelimit status=PASS cost=29.473s