aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_entrynodes.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-07-09 10:17:20 -0400
committerNick Mathewson <nickm@torproject.org>2018-07-09 10:17:20 -0400
commit1b81c4b5f3a3b2ad8a3d3a23a75e5bac08c22a89 (patch)
treed3c9cb2e3d78416db9bf70bdbad7e07c242aac69 /src/test/test_entrynodes.c
parente7463be39b25db8f682146a690a2f590ce0ca8c0 (diff)
parent98dff5df3fd22be0a7a084dace22b218243e5164 (diff)
downloadtor-1b81c4b5f3a3b2ad8a3d3a23a75e5bac08c22a89.tar.gz
tor-1b81c4b5f3a3b2ad8a3d3a23a75e5bac08c22a89.zip
Merge branch 'maint-0.3.4'
Diffstat (limited to 'src/test/test_entrynodes.c')
-rw-r--r--src/test/test_entrynodes.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/test_entrynodes.c b/src/test/test_entrynodes.c
index cafdeb6863..cb694106c4 100644
--- a/src/test/test_entrynodes.c
+++ b/src/test/test_entrynodes.c
@@ -1163,6 +1163,7 @@ test_entry_guard_update_from_consensus_status(void *arg)
for (i = 0; i < 5; ++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);
+ tt_assert(n);
n->is_possible_guard = 0;
}
@@ -1201,6 +1202,7 @@ test_entry_guard_update_from_consensus_status(void *arg)
{
entry_guard_t *g = smartlist_get(gs->sampled_entry_guards, 0);
node_t *n = (node_t*) bfn_mock_node_get_by_id(g->identity);
+ tt_assert(n);
n->is_possible_guard = 1;
}
{
@@ -1208,6 +1210,7 @@ test_entry_guard_update_from_consensus_status(void *arg)
*/
entry_guard_t *g = smartlist_get(gs->sampled_entry_guards, 5);
node_t *n = (node_t*) bfn_mock_node_get_by_id(g->identity);
+ tt_assert(n);
smartlist_remove(big_fake_net_nodes, n);
test_node_free(n);
}
@@ -1264,6 +1267,7 @@ test_entry_guard_update_from_consensus_repair(void *arg)
/* these will get a date. */
entry_guard_t *g = smartlist_get(gs->sampled_entry_guards, i);
node_t *n = (node_t*) bfn_mock_node_get_by_id(g->identity);
+ tt_assert(n);
n->is_possible_guard = 0;
g->currently_listed = 0;
}
@@ -1329,6 +1333,7 @@ test_entry_guard_update_from_consensus_remove(void *arg)
{
entry_guard_t *g = smartlist_get(gs->sampled_entry_guards, 0);
node_t *n = (node_t*) bfn_mock_node_get_by_id(g->identity);
+ tt_assert(n);
n->is_possible_guard = 0;
g->currently_listed = 0;
g->unlisted_since_date = one_day_ago;
@@ -1338,6 +1343,7 @@ test_entry_guard_update_from_consensus_remove(void *arg)
{
entry_guard_t *g = smartlist_get(gs->sampled_entry_guards, 1);
node_t *n = (node_t*) bfn_mock_node_get_by_id(g->identity);
+ tt_assert(n);
n->is_possible_guard = 0;
g->currently_listed = 0;
g->unlisted_since_date = one_year_ago;