From 37fed06ef3f9ee395c671d91b3312679aeb4e6f1 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sun, 5 Jul 2026 19:00:03 +0200 Subject: ipcpd: Add congestion avoidance unit tests Cover the shared per-aggregate contexts, the mb-ecn policy and the link capacity estimator. The controller tests pin the invariants of the algorithm: the first mark is reported immediately, the receiver's congestion mean is independent of packet rate and its window adapts to hold a fixed sample count, increase and decrease are invariant under control cadence, a starved sender still cuts and later recovers, signals age out on rate-relative horizons, capacity feedback derives the rate floor and recovery slope with clamps and a staleness fallback, and the pacer bounds the burst after idle. The estimator tests drive synthetic arrival traces: the capacity code survives a round trip within its resolution, hops combine by MIN, busy-period drain measures the link rate, windows extend on slow links, sparse idle observations are tolerated where unsaturated windows are rejected, shaped links measure at the shaped rate, stale windows are discarded, and windows bordering an empty queue can only lower the estimate. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/ipcpd/unicast/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ipcpd/unicast/CMakeLists.txt') diff --git a/src/ipcpd/unicast/CMakeLists.txt b/src/ipcpd/unicast/CMakeLists.txt index d51546a3..2373f877 100644 --- a/src/ipcpd/unicast/CMakeLists.txt +++ b/src/ipcpd/unicast/CMakeLists.txt @@ -44,7 +44,9 @@ ouroboros_target_debug_definitions(${IPCP_UNICAST_TARGET}) install(TARGETS ${IPCP_UNICAST_TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}) if(BUILD_TESTS) + add_subdirectory(ca/tests) add_subdirectory(dir/tests) add_subdirectory(pff/tests) add_subdirectory(routing/tests) + add_subdirectory(tests) endif() -- cgit v1.2.3