mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
test: New behavior on IP retry for HSv3
Unit test for #31652 where if we are over the retry limit for the IP but we have an established circuit, we don't remove the IP. Part of #31652
This commit is contained in:
parent
f50de3a918
commit
7c1b2fceb7
@ -1296,6 +1296,11 @@ test_service_event(void *arg)
|
|||||||
service_intro_point_add(service->desc_current->intro_points.map, ip);
|
service_intro_point_add(service->desc_current->intro_points.map, ip);
|
||||||
ip->circuit_established = 1; /* We'll test that, it MUST be 0 after. */
|
ip->circuit_established = 1; /* We'll test that, it MUST be 0 after. */
|
||||||
run_housekeeping_event(now);
|
run_housekeeping_event(now);
|
||||||
|
tt_int_op(digest256map_size(service->desc_current->intro_points.map),
|
||||||
|
OP_EQ, 1);
|
||||||
|
/* No removal if we have an established circuit after retries. */
|
||||||
|
ip->circuit_retries = MAX_INTRO_POINT_CIRCUIT_RETRIES + 1;
|
||||||
|
run_housekeeping_event(now);
|
||||||
tt_int_op(digest256map_size(service->desc_current->intro_points.map),
|
tt_int_op(digest256map_size(service->desc_current->intro_points.map),
|
||||||
OP_EQ, 1);
|
OP_EQ, 1);
|
||||||
/* Remove the IP object at once for the next test. */
|
/* Remove the IP object at once for the next test. */
|
||||||
|
Loading…
Reference in New Issue
Block a user