mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Test no-consensus case for filter.
This commit is contained in:
parent
a7bc73935b
commit
9cad2628dd
@ -1391,6 +1391,20 @@ test_entry_guard_node_filter(void *arg)
|
||||
}
|
||||
tt_int_op(num_reachable_filtered_guards(gs), OP_EQ, 1);
|
||||
|
||||
/* Now make sure we have no live consensus, and no nodes. Nothing should
|
||||
* pass the filter any more. */
|
||||
tor_free(dummy_consensus);
|
||||
dummy_consensus = NULL;
|
||||
SMARTLIST_FOREACH(big_fake_net_nodes, node_t *, node, {
|
||||
memset(node->identity, 0xff, 20);
|
||||
});
|
||||
entry_guards_update_filtered_sets(gs);
|
||||
for (i = 0; i < NUM; ++i) {
|
||||
tt_assert(g[i]->is_filtered_guard == 0);
|
||||
tt_assert(g[i]->is_usable_filtered_guard == 0);
|
||||
}
|
||||
tt_int_op(num_reachable_filtered_guards(gs), OP_EQ, 0);
|
||||
|
||||
done:
|
||||
guard_selection_free(gs);
|
||||
tor_free(bl);
|
||||
|
Loading…
Reference in New Issue
Block a user