Commit a1735ac9 authored by Mike Perry's avatar Mike Perry
Browse files

fixup! Add clock heuristic test vector for congestion control.

Fix clock heuristic test vector for bug 40626
parent c626cc79
Pipeline #42051 failed with stage
in 5 minutes and 28 seconds
......@@ -55,6 +55,7 @@ run_clock_test_vec(congestion_control_t *cc,
{
for (size_t i = 0; i < vec_len; i++) {
cc->in_slow_start = vec[i].in_slow_start_in;
cc->ewma_rtt_usec = vec[i].old_delta_in*1000;
bool ret = time_delta_stalled_or_jumped(cc,
vec[i].old_delta_in,
vec[i].new_delta_in);
......@@ -83,16 +84,23 @@ test_congestion_control_clock(void *arg)
(void)arg;
clock_vec_t vect1[] =
{
{0, 1, 1, 0, 0}, // old delta 0 -> use cached (false)
{0, 0, 1, 1, 1}, // New delta 0 -> cache 1 (true)
{1, 1, 1, 1, 1}, // In slow start -> use cached (true)
{1, 1, 0, 0, 0}, // Not slow start -> update cache
{1, 4999, 1, 0, 0}, // In slow start -> use cached (false)
{4999, 1, 1, 0, 0}, // In slow start -> use cached (false)
{5001, 1, 0, 1, 1}, // Not slow start w/ 5000x change -> update cache
{1, 1, 1, 1, 1}, // In slow start -> use cached (true)
{1, 1, 0, 0, 0}, // Not slow start -> update cache
{1, 5001, 0, 1, 1} // Not slow start w/ 5000x change -> update cache
{0, 1, 1, 0, 0}, // old delta 0, slow start -> false
{0, 0, 1, 1, 1}, // New delta 0 -> cache true, return true
{1, 1, 1, 1, 0}, // In slow start -> keep cache, but return false
{1, 4999, 0, 0, 0}, // Not slow start, edge -> update cache, and false
{4999, 1, 0, 0, 0}, // Not slow start, other edge -> false
{5001, 1, 0, 0, 0}, // Not slow start w/ -5000x -> use cache (false)
{5001, 0, 0, 1, 1}, // New delta 0 -> cache true, return true
{5001, 1, 0, 1, 1}, // Not slow start w/ -5000x -> use cache (true)
{5001, 1, 1, 1, 0}, // In slow start w/ -5000x -> false
{0, 5001, 0, 1, 0}, // Not slow start w/ no EWMA -> false
{1, 5001, 1, 1, 0}, // In slow start w/ +5000x -> false
{1, 1, 0, 0, 0}, // Not slow start -> update cache to false
{5001, 1, 0, 0, 0}, // Not slow start w/ -5000x -> use cache (false)
{1, 5001, 0, 0, 1}, // Not slow start w/ +5000x -> true
{0, 5001, 0, 0, 0}, // Not slow start w/ no EWMA -> false
{5001, 1, 1, 0, 0}, // In slow start w/ -5000x change -> false
{1, 1, 0, 0, 0} // Not slow start -> false
};
circuit_params_t params;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment