tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 6d419a3da31162db989943e98fbb8de3f03b0020
parent e934d713b3847401ee08581dae88bb4a4eea5c14
Author: Nick Mathewson <nickm@torproject.org>
Date:   Fri, 16 Oct 2020 07:40:54 -0400

test_dir_common: make sure we include pr lines. Fixes 7 tests.

Diffstat:
Msrc/test/test_dir_common.c | 4++++
Msrc/test/test_routerlist.c | 4+---
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/test/test_dir_common.c b/src/test/test_dir_common.c @@ -104,6 +104,7 @@ dir_common_gen_routerstatus_for_v3ns(int idx, time_t now) rs->is_flagged_running = 1; rs->is_v2_dir = 1; rs->is_valid = 1; /* xxxxx */ + vrs->protocols = tor_strdup("Link=7 HSDir=3"); break; case 1: /* Generate the second routerstatus. */ @@ -122,6 +123,7 @@ dir_common_gen_routerstatus_for_v3ns(int idx, time_t now) rs->ipv6_orport = 4711; rs->is_exit = rs->is_stable = rs->is_fast = rs->is_flagged_running = rs->is_valid = rs->is_possible_guard = rs->is_v2_dir = 1; + vrs->protocols = tor_strdup("Link=3,4 HSDir=2,3"); break; case 2: /* Generate the third routerstatus. */ @@ -138,6 +140,7 @@ dir_common_gen_routerstatus_for_v3ns(int idx, time_t now) rs->is_authority = rs->is_exit = rs->is_stable = rs->is_fast = rs->is_flagged_running = rs->is_valid = rs->is_v2_dir = rs->is_possible_guard = 1; + vrs->protocols = tor_strdup("Link=3,4 HSDir=2,3"); break; case 3: /* Generate a fourth routerstatus that is not running. */ @@ -152,6 +155,7 @@ dir_common_gen_routerstatus_for_v3ns(int idx, time_t now) rs->ipv4_orport = 500; rs->ipv4_dirport = 1999; rs->is_v2_dir = 1; + vrs->protocols = tor_strdup("Link=3,4 HSDir=3"); /* Running flag (and others) cleared */ break; case 4: diff --git a/src/test/test_routerlist.c b/src/test/test_routerlist.c @@ -52,8 +52,6 @@ #include "test/test_dir_common.h" #include "test/log_test_helpers.h" -void construct_consensus(char **consensus_text_md, time_t now); - static authority_cert_t *mock_cert; static authority_cert_t * @@ -150,7 +148,7 @@ test_routerlist_launch_descriptor_downloads(void *arg) smartlist_free(downloadable); } -void +static void construct_consensus(char **consensus_text_md, time_t now) { networkstatus_t *vote = NULL;