diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-11-26 10:06:50 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-12-16 11:06:17 -0500 |
commit | d2af9826fd0a75efee8612b96709c39f24196f53 (patch) | |
tree | 9fabbb884e4e9a2c46b10af6e25e24b1e46b6a1b /src/test/test_entrynodes.c | |
parent | 039bd01767d42961cb16ff4914481332b52cf8db (diff) | |
download | tor-d2af9826fd0a75efee8612b96709c39f24196f53.tar.gz tor-d2af9826fd0a75efee8612b96709c39f24196f53.zip |
Turn #defines for prop271 into networkstatus params
Some of these will get torrc options to override them too; this
is just the mechanical conversion.
Also, add documentation for a couple of undocumented (but now used)
parameters.
Diffstat (limited to 'src/test/test_entrynodes.c')
-rw-r--r-- | src/test/test_entrynodes.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/test/test_entrynodes.c b/src/test/test_entrynodes.c index de36142d9a..ee0837532c 100644 --- a/src/test/test_entrynodes.c +++ b/src/test/test_entrynodes.c @@ -1425,7 +1425,7 @@ test_entry_guard_expand_sample(void *arg) num_reachable_filtered_guards(gs)); /* Make sure we got the right number. */ - tt_int_op(MIN_FILTERED_SAMPLE_SIZE, OP_EQ, + tt_int_op(DFLT_MIN_FILTERED_SAMPLE_SIZE, OP_EQ, num_reachable_filtered_guards(gs)); // Make sure everything we got was from our fake node list, and everything @@ -1444,7 +1444,7 @@ test_entry_guard_expand_sample(void *arg) // make no changes. guard = entry_guards_expand_sample(gs); tt_assert(! guard); // no guard was added. - tt_int_op(MIN_FILTERED_SAMPLE_SIZE, OP_EQ, + tt_int_op(DFLT_MIN_FILTERED_SAMPLE_SIZE, OP_EQ, num_reachable_filtered_guards(gs)); // Make a few guards unreachable. @@ -1454,13 +1454,13 @@ test_entry_guard_expand_sample(void *arg) guard->is_usable_filtered_guard = 0; guard = smartlist_get(gs->sampled_entry_guards, 2); guard->is_usable_filtered_guard = 0; - tt_int_op(MIN_FILTERED_SAMPLE_SIZE - 3, OP_EQ, + tt_int_op(DFLT_MIN_FILTERED_SAMPLE_SIZE - 3, OP_EQ, num_reachable_filtered_guards(gs)); // This time, expanding the sample will add some more guards. guard = entry_guards_expand_sample(gs); tt_assert(guard); // no guard was added. - tt_int_op(MIN_FILTERED_SAMPLE_SIZE, OP_EQ, + tt_int_op(DFLT_MIN_FILTERED_SAMPLE_SIZE, OP_EQ, num_reachable_filtered_guards(gs)); tt_int_op(smartlist_len(gs->sampled_entry_guards), OP_EQ, num_reachable_filtered_guards(gs)+3); @@ -1468,7 +1468,7 @@ test_entry_guard_expand_sample(void *arg) // Still idempotent. guard = entry_guards_expand_sample(gs); tt_assert(! guard); // no guard was added. - tt_int_op(MIN_FILTERED_SAMPLE_SIZE, OP_EQ, + tt_int_op(DFLT_MIN_FILTERED_SAMPLE_SIZE, OP_EQ, num_reachable_filtered_guards(gs)); // Now, do a nasty trick: tell the filter to exclude 31/32 of the guards. @@ -1486,7 +1486,7 @@ test_entry_guard_expand_sample(void *arg) // Surely (p ~ 1-2**-60), one of our guards has been excluded. tt_int_op(num_reachable_filtered_guards(gs), OP_LT, - MIN_FILTERED_SAMPLE_SIZE); + DFLT_MIN_FILTERED_SAMPLE_SIZE); // Try to regenerate the guards. guard = entry_guards_expand_sample(gs); @@ -1494,7 +1494,7 @@ test_entry_guard_expand_sample(void *arg) /* this time, it's possible that we didn't add enough sampled guards. */ tt_int_op(num_reachable_filtered_guards(gs), OP_LE, - MIN_FILTERED_SAMPLE_SIZE); + DFLT_MIN_FILTERED_SAMPLE_SIZE); /* but we definitely didn't exceed the sample maximum. */ tt_int_op(smartlist_len(gs->sampled_entry_guards), OP_LE, (int)((271 / 2) * .3)); |