mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Merge branch 'maint-0.3.2' into maint-0.3.3
This commit is contained in:
commit
250e0fc1c4
@ -1125,6 +1125,7 @@ test_entry_guard_update_from_consensus_status(void *arg)
|
|||||||
for (i = 0; i < 5; ++i) {
|
for (i = 0; i < 5; ++i) {
|
||||||
entry_guard_t *g = smartlist_get(gs->sampled_entry_guards, i);
|
entry_guard_t *g = smartlist_get(gs->sampled_entry_guards, i);
|
||||||
node_t *n = (node_t*) bfn_mock_node_get_by_id(g->identity);
|
node_t *n = (node_t*) bfn_mock_node_get_by_id(g->identity);
|
||||||
|
tt_assert(n);
|
||||||
n->is_possible_guard = 0;
|
n->is_possible_guard = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1163,6 +1164,7 @@ test_entry_guard_update_from_consensus_status(void *arg)
|
|||||||
{
|
{
|
||||||
entry_guard_t *g = smartlist_get(gs->sampled_entry_guards, 0);
|
entry_guard_t *g = smartlist_get(gs->sampled_entry_guards, 0);
|
||||||
node_t *n = (node_t*) bfn_mock_node_get_by_id(g->identity);
|
node_t *n = (node_t*) bfn_mock_node_get_by_id(g->identity);
|
||||||
|
tt_assert(n);
|
||||||
n->is_possible_guard = 1;
|
n->is_possible_guard = 1;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -1170,6 +1172,7 @@ test_entry_guard_update_from_consensus_status(void *arg)
|
|||||||
*/
|
*/
|
||||||
entry_guard_t *g = smartlist_get(gs->sampled_entry_guards, 5);
|
entry_guard_t *g = smartlist_get(gs->sampled_entry_guards, 5);
|
||||||
node_t *n = (node_t*) bfn_mock_node_get_by_id(g->identity);
|
node_t *n = (node_t*) bfn_mock_node_get_by_id(g->identity);
|
||||||
|
tt_assert(n);
|
||||||
smartlist_remove(big_fake_net_nodes, n);
|
smartlist_remove(big_fake_net_nodes, n);
|
||||||
tor_free(n->rs);
|
tor_free(n->rs);
|
||||||
tor_free(n->md);
|
tor_free(n->md);
|
||||||
@ -1228,6 +1231,7 @@ test_entry_guard_update_from_consensus_repair(void *arg)
|
|||||||
/* these will get a date. */
|
/* these will get a date. */
|
||||||
entry_guard_t *g = smartlist_get(gs->sampled_entry_guards, i);
|
entry_guard_t *g = smartlist_get(gs->sampled_entry_guards, i);
|
||||||
node_t *n = (node_t*) bfn_mock_node_get_by_id(g->identity);
|
node_t *n = (node_t*) bfn_mock_node_get_by_id(g->identity);
|
||||||
|
tt_assert(n);
|
||||||
n->is_possible_guard = 0;
|
n->is_possible_guard = 0;
|
||||||
g->currently_listed = 0;
|
g->currently_listed = 0;
|
||||||
}
|
}
|
||||||
@ -1293,6 +1297,7 @@ test_entry_guard_update_from_consensus_remove(void *arg)
|
|||||||
{
|
{
|
||||||
entry_guard_t *g = smartlist_get(gs->sampled_entry_guards, 0);
|
entry_guard_t *g = smartlist_get(gs->sampled_entry_guards, 0);
|
||||||
node_t *n = (node_t*) bfn_mock_node_get_by_id(g->identity);
|
node_t *n = (node_t*) bfn_mock_node_get_by_id(g->identity);
|
||||||
|
tt_assert(n);
|
||||||
n->is_possible_guard = 0;
|
n->is_possible_guard = 0;
|
||||||
g->currently_listed = 0;
|
g->currently_listed = 0;
|
||||||
g->unlisted_since_date = one_day_ago;
|
g->unlisted_since_date = one_day_ago;
|
||||||
@ -1302,6 +1307,7 @@ test_entry_guard_update_from_consensus_remove(void *arg)
|
|||||||
{
|
{
|
||||||
entry_guard_t *g = smartlist_get(gs->sampled_entry_guards, 1);
|
entry_guard_t *g = smartlist_get(gs->sampled_entry_guards, 1);
|
||||||
node_t *n = (node_t*) bfn_mock_node_get_by_id(g->identity);
|
node_t *n = (node_t*) bfn_mock_node_get_by_id(g->identity);
|
||||||
|
tt_assert(n);
|
||||||
n->is_possible_guard = 0;
|
n->is_possible_guard = 0;
|
||||||
g->currently_listed = 0;
|
g->currently_listed = 0;
|
||||||
g->unlisted_since_date = one_year_ago;
|
g->unlisted_since_date = one_year_ago;
|
||||||
|
Loading…
Reference in New Issue
Block a user