test(e2e): widen the fast-path RTT bound to 100 ms via harness.FAST_RTT_MS

The 'impairment cleared' asserts used avg < 50 on three-packet IOS pings;
the unimpaired baseline is 20-45 ms with 4 ms quantization, and host
scheduling jitter pushed averages to 54/56 in two full-suite runs
(esw, dynamips) — a margin, not an impairment (the qdisc asserts pass,
success is 100 %). The contrasted delayed regime is >= 150 ms, so a
100 ms bound still separates the two cleanly. Docker's sub-millisecond
veth asserts keep their 50 ms bound (three orders of magnitude of
headroom, never observed to flake).
This commit is contained in:
YueGuobin committed 2026-10-06 00:21:11 +08:00
1 parent f21d7be99c
commit f688e654e1
7 files changed
+18 -9

No files matched your search

@@ -236,7 +236,7 @@ def test_ethernet_switch_kernel_fast_path():
compute.call("PUT", f"/projects/{pid}/links/{link1['link_id']}", {"filters": {}})
assert "netem" not in harness.qdiscs(a1)
fast = harness.wait_ping(c1, "10.1.1.2")
assert fast["success"] == 100 and fast["avg"] < 50, fast
assert fast["success"] == 100 and fast["avg"] < harness.FAST_RTT_MS, fast
# The same single-owned impairment on link2 — created switch-first,
# the order whose peer NIO update runs LAST. The passive end's empty
@@ -252,7 +252,7 @@ def test_ethernet_switch_kernel_fast_path():
compute.call("PUT", f"/projects/{pid}/links/{link2['link_id']}", {"filters": {}})
assert "netem" not in harness.qdiscs(a2)
fast2 = harness.wait_ping(c1, "10.1.1.2")
assert fast2["success"] == 100 and fast2["avg"] < 50, fast2
assert fast2["success"] == 100 and fast2["avg"] < harness.FAST_RTT_MS, fast2
# suspend: the anchor admin-downs, the link is dead; resume restores
compute.call("PUT", f"/projects/{pid}/links/{link1['link_id']}", {"suspend": True})