aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-10-12 11:39:37 -0400
committerNick Mathewson <nickm@torproject.org>2018-10-12 11:39:37 -0400
commit67351f672450d5f13754294405243a59ddd86de9 (patch)
tree016368ae0c3b6e56c0dc03c185fe5a095d72f22e /src/test
parent391756f262c93d4361fb6189a3ba9704283f73aa (diff)
parenta1504f138d978d73b2c6129957dd0ee344a97efa (diff)
downloadtor-67351f672450d5f13754294405243a59ddd86de9.tar.gz
tor-67351f672450d5f13754294405243a59ddd86de9.zip
Merge remote-tracking branch 'tor-github/pr/380'
Diffstat (limited to 'src/test')
-rw-r--r--src/test/fuzz/fuzz_consensus.c6
-rw-r--r--src/test/fuzz/fuzz_descriptor.c6
-rw-r--r--src/test/fuzz/fuzz_extrainfo.c6
-rw-r--r--src/test/fuzz/fuzz_hsdescv2.c4
-rw-r--r--src/test/fuzz/fuzz_hsdescv3.c3
-rw-r--r--src/test/fuzz/fuzz_iptsv2.c5
-rw-r--r--src/test/fuzz/fuzz_microdesc.c5
-rw-r--r--src/test/fuzz/fuzz_vrs.c5
-rw-r--r--src/test/test.c2
-rw-r--r--src/test/test_consdiffmgr.c2
-rw-r--r--src/test/test_dir.c10
-rw-r--r--src/test/test_dir_common.c2
-rw-r--r--src/test/test_dir_common.h1
-rw-r--r--src/test/test_dir_handle_get.c2
-rw-r--r--src/test/test_entrynodes.c1
-rw-r--r--src/test/test_guardfraction.c4
-rw-r--r--src/test/test_hs_service.c31
-rw-r--r--src/test/test_microdesc.c5
-rw-r--r--src/test/test_policy.c11
-rw-r--r--src/test/test_routerlist.c3
-rw-r--r--src/test/test_routerset.c6
-rw-r--r--src/test/test_shared_random.c2
22 files changed, 69 insertions, 53 deletions
diff --git a/src/test/fuzz/fuzz_consensus.c b/src/test/fuzz/fuzz_consensus.c
index b170fd33d8..b56702a650 100644
--- a/src/test/fuzz/fuzz_consensus.c
+++ b/src/test/fuzz/fuzz_consensus.c
@@ -1,8 +1,10 @@
/* Copyright (c) 2016-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#define ROUTERPARSE_PRIVATE
+#define SIGCOMMON_PRIVATE
#include "core/or/or.h"
-#include "feature/nodelist/routerparse.h"
+#include "feature/dirparse/ns_parse.h"
+#include "feature/dirparse/sigcommon.h"
+#include "feature/dirparse/unparseable.h"
#include "feature/nodelist/networkstatus.h"
#include "lib/crypt_ops/crypto_ed25519.h"
#include "feature/nodelist/networkstatus_st.h"
diff --git a/src/test/fuzz/fuzz_descriptor.c b/src/test/fuzz/fuzz_descriptor.c
index 2babdce4bf..3420113717 100644
--- a/src/test/fuzz/fuzz_descriptor.c
+++ b/src/test/fuzz/fuzz_descriptor.c
@@ -1,8 +1,10 @@
/* Copyright (c) 2016-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#define ROUTERPARSE_PRIVATE
+#define SIGCOMMON_PRIVATE
#include "core/or/or.h"
-#include "feature/nodelist/routerparse.h"
+#include "feature/dirparse/routerparse.h"
+#include "feature/dirparse/sigcommon.h"
+#include "feature/dirparse/unparseable.h"
#include "feature/nodelist/routerlist.h"
#include "feature/nodelist/torcert.h"
#include "feature/keymgt/loadkey.h"
diff --git a/src/test/fuzz/fuzz_extrainfo.c b/src/test/fuzz/fuzz_extrainfo.c
index 6c88f80122..da0fe80838 100644
--- a/src/test/fuzz/fuzz_extrainfo.c
+++ b/src/test/fuzz/fuzz_extrainfo.c
@@ -1,8 +1,10 @@
/* Copyright (c) 2016-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#define ROUTERPARSE_PRIVATE
+#define SIGCOMMON_PRIVATE
#include "core/or/or.h"
-#include "feature/nodelist/routerparse.h"
+#include "feature/dirparse/routerparse.h"
+#include "feature/dirparse/sigcommon.h"
+#include "feature/dirparse/unparseable.h"
#include "feature/nodelist/routerlist.h"
#include "feature/relay/routerkeys.h"
#include "test/fuzz/fuzzing.h"
diff --git a/src/test/fuzz/fuzz_hsdescv2.c b/src/test/fuzz/fuzz_hsdescv2.c
index fd5da41635..667b58b3aa 100644
--- a/src/test/fuzz/fuzz_hsdescv2.c
+++ b/src/test/fuzz/fuzz_hsdescv2.c
@@ -1,9 +1,9 @@
/* Copyright (c) 2016-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#define ROUTERPARSE_PRIVATE
#include "core/or/or.h"
-#include "feature/nodelist/routerparse.h"
+#include "feature/dirparse/unparseable.h"
#include "feature/rend/rendcommon.h"
+#include "feature/rend/rendparse.h"
#include "lib/crypt_ops/crypto_ed25519.h"
#include "test/fuzz/fuzzing.h"
diff --git a/src/test/fuzz/fuzz_hsdescv3.c b/src/test/fuzz/fuzz_hsdescv3.c
index b332973b39..d5ddcc2e27 100644
--- a/src/test/fuzz/fuzz_hsdescv3.c
+++ b/src/test/fuzz/fuzz_hsdescv3.c
@@ -1,14 +1,13 @@
/* Copyright (c) 2017-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#define ROUTERPARSE_PRIVATE
#define HS_DESCRIPTOR_PRIVATE
#include "core/or/or.h"
#include "trunnel/ed25519_cert.h" /* Trunnel interface. */
#include "lib/crypt_ops/crypto_ed25519.h"
#include "feature/hs/hs_descriptor.h"
-#include "feature/nodelist/routerparse.h"
+#include "feature/dirparse/unparseable.h"
#include "test/fuzz/fuzzing.h"
diff --git a/src/test/fuzz/fuzz_iptsv2.c b/src/test/fuzz/fuzz_iptsv2.c
index a3082f4d0e..265677eebe 100644
--- a/src/test/fuzz/fuzz_iptsv2.c
+++ b/src/test/fuzz/fuzz_iptsv2.c
@@ -1,9 +1,10 @@
/* Copyright (c) 2016-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#define ROUTERPARSE_PRIVATE
+
#include "core/or/or.h"
-#include "feature/nodelist/routerparse.h"
+#include "feature/dirparse/unparseable.h"
#include "feature/rend/rendcommon.h"
+#include "feature/rend/rendparse.h"
#include "lib/crypt_ops/crypto_ed25519.h"
#include "feature/rend/rend_service_descriptor_st.h"
diff --git a/src/test/fuzz/fuzz_microdesc.c b/src/test/fuzz/fuzz_microdesc.c
index fa9676372d..ab54cf2a34 100644
--- a/src/test/fuzz/fuzz_microdesc.c
+++ b/src/test/fuzz/fuzz_microdesc.c
@@ -1,8 +1,9 @@
/* Copyright (c) 2016-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#define ROUTERPARSE_PRIVATE
+
#include "core/or/or.h"
-#include "feature/nodelist/routerparse.h"
+#include "feature/dirparse/microdesc_parse.h"
+#include "feature/dirparse/unparseable.h"
#include "feature/nodelist/microdesc.h"
#include "lib/crypt_ops/crypto_ed25519.h"
diff --git a/src/test/fuzz/fuzz_vrs.c b/src/test/fuzz/fuzz_vrs.c
index 8c96851b1f..0b869aa5c0 100644
--- a/src/test/fuzz/fuzz_vrs.c
+++ b/src/test/fuzz/fuzz_vrs.c
@@ -1,9 +1,10 @@
/* Copyright (c) 2016-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#define ROUTERPARSE_PRIVATE
+#define NS_PARSE_PRIVATE
#define NETWORKSTATUS_PRIVATE
#include "core/or/or.h"
-#include "feature/nodelist/routerparse.h"
+#include "feature/dirparse/ns_parse.h"
+#include "feature/dirparse/unparseable.h"
#include "lib/memarea/memarea.h"
#include "feature/nodelist/microdesc.h"
#include "feature/nodelist/networkstatus.h"
diff --git a/src/test/test.c b/src/test/test.c
index fff87a2b56..70d91e3967 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -45,6 +45,7 @@
#include "core/or/connection_edge.h"
#include "feature/rend/rendcommon.h"
#include "feature/rend/rendcache.h"
+#include "feature/rend/rendparse.h"
#include "test/test.h"
#include "core/mainloop/mainloop.h"
#include "lib/memarea/memarea.h"
@@ -54,7 +55,6 @@
#include "core/crypto/onion_tap.h"
#include "core/or/policies.h"
#include "feature/stats/rephist.h"
-#include "feature/nodelist/routerparse.h"
#include "app/config/statefile.h"
#include "lib/crypt_ops/crypto_curve25519.h"
diff --git a/src/test/test_consdiffmgr.c b/src/test/test_consdiffmgr.c
index 6c0601b504..6c451da685 100644
--- a/src/test/test_consdiffmgr.c
+++ b/src/test/test_consdiffmgr.c
@@ -11,7 +11,7 @@
#include "core/mainloop/cpuworker.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "feature/nodelist/networkstatus.h"
-#include "feature/nodelist/routerparse.h"
+#include "feature/dirparse/ns_parse.h"
#include "lib/evloop/workqueue.h"
#include "lib/compress/compress.h"
#include "lib/encoding/confline.h"
diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index aa1c706b1f..c18aa99fea 100644
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@ -16,11 +16,12 @@
#define DLSTATUS_PRIVATE
#define HIBERNATE_PRIVATE
#define NETWORKSTATUS_PRIVATE
+#define NS_PARSE_PRIVATE
#define NODE_SELECT_PRIVATE
#define RELAY_PRIVATE
#define ROUTERLIST_PRIVATE
-#define ROUTERPARSE_PRIVATE
#define ROUTER_PRIVATE
+#define UNPARSEABLE_PRIVATE
#define VOTEFLAGS_PRIVATE
#include "core/or/or.h"
@@ -28,11 +29,13 @@
#include "app/config/confparse.h"
#include "core/mainloop/connection.h"
#include "core/or/relay.h"
+#include "core/or/versions.h"
#include "feature/client/bridges.h"
#include "feature/client/entrynodes.h"
#include "feature/control/control.h"
#include "feature/dirauth/bwauth.h"
#include "feature/dirauth/dirvote.h"
+#include "feature/dirauth/dsigs_parse.h"
#include "feature/dirauth/process_descs.h"
#include "feature/dirauth/recommend_pkg.h"
#include "feature/dirauth/shared_random_state.h"
@@ -51,7 +54,10 @@
#include "feature/nodelist/nickname.h"
#include "feature/nodelist/node_select.h"
#include "feature/nodelist/routerlist.h"
-#include "feature/nodelist/routerparse.h"
+#include "feature/dirparse/authcert_parse.h"
+#include "feature/dirparse/ns_parse.h"
+#include "feature/dirparse/routerparse.h"
+#include "feature/dirparse/unparseable.h"
#include "feature/nodelist/routerset.h"
#include "feature/nodelist/torcert.h"
#include "feature/relay/router.h"
diff --git a/src/test/test_dir_common.c b/src/test/test_dir_common.c
index e65e2b0111..86d2838944 100644
--- a/src/test/test_dir_common.c
+++ b/src/test/test_dir_common.c
@@ -10,6 +10,8 @@
#include "feature/dirauth/dirvote.h"
#include "feature/nodelist/nodelist.h"
#include "feature/nodelist/routerlist.h"
+#include "feature/dirparse/authcert_parse.h"
+#include "feature/dirparse/ns_parse.h"
#include "test/test_dir_common.h"
#include "feature/dircommon/voting_schedule.h"
diff --git a/src/test/test_dir_common.h b/src/test/test_dir_common.h
index 1e90228edb..1e958a21ff 100644
--- a/src/test/test_dir_common.h
+++ b/src/test/test_dir_common.h
@@ -5,7 +5,6 @@
#include "core/or/or.h"
#include "feature/nodelist/networkstatus.h"
-#include "feature/nodelist/routerparse.h"
#define TEST_DIR_ROUTER_ID_1 3
#define TEST_DIR_ROUTER_ID_2 5
diff --git a/src/test/test_dir_handle_get.c b/src/test/test_dir_handle_get.c
index 623d9e9b9d..1d4a36d7fc 100644
--- a/src/test/test_dir_handle_get.c
+++ b/src/test/test_dir_handle_get.c
@@ -29,7 +29,7 @@
#include "test/test_helpers.h"
#include "feature/nodelist/nodelist.h"
#include "feature/client/entrynodes.h"
-#include "feature/nodelist/routerparse.h"
+#include "feature/dirparse/authcert_parse.h"
#include "feature/nodelist/networkstatus.h"
#include "core/proto/proto_http.h"
#include "lib/geoip/geoip.h"
diff --git a/src/test/test_entrynodes.c b/src/test/test_entrynodes.c
index ebe9accf5a..b67c9fae53 100644
--- a/src/test/test_entrynodes.c
+++ b/src/test/test_entrynodes.c
@@ -26,7 +26,6 @@
#include "feature/nodelist/networkstatus.h"
#include "core/or/policies.h"
#include "feature/nodelist/routerlist.h"
-#include "feature/nodelist/routerparse.h"
#include "feature/nodelist/routerset.h"
#include "app/config/statefile.h"
diff --git a/src/test/test_guardfraction.c b/src/test/test_guardfraction.c
index 7d4a959bb4..d6f4cd63f2 100644
--- a/src/test/test_guardfraction.c
+++ b/src/test/test_guardfraction.c
@@ -2,15 +2,15 @@
/* See LICENSE for licensing information */
#define GUARDFRACTION_PRIVATE
-#define ROUTERPARSE_PRIVATE
#define NETWORKSTATUS_PRIVATE
+#define NS_PARSE_PRIVATE
#include "orconfig.h"
#include "core/or/or.h"
#include "app/config/config.h"
#include "feature/dirauth/guardfraction.h"
#include "feature/client/entrynodes.h"
-#include "feature/nodelist/routerparse.h"
+#include "feature/dirparse/ns_parse.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/networkstatus_st.h"
diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c
index 334bde3e7b..957bf6e103 100644
--- a/src/test/test_hs_service.c
+++ b/src/test/test_hs_service.c
@@ -21,7 +21,6 @@
#define STATEFILE_PRIVATE
#define TOR_CHANNEL_INTERNAL_
#define HS_CLIENT_PRIVATE
-#define ROUTERPARSE_PRIVATE
#include "test/test.h"
#include "test/test_helpers.h"
@@ -31,33 +30,33 @@
#include "core/or/or.h"
#include "app/config/config.h"
+#include "app/config/statefile.h"
+#include "core/crypto/hs_ntor.h"
+#include "core/mainloop/connection.h"
+#include "core/mainloop/mainloop.h"
#include "core/or/circuitbuild.h"
#include "core/or/circuitlist.h"
#include "core/or/circuituse.h"
-#include "core/mainloop/connection.h"
#include "core/or/connection_edge.h"
#include "core/or/edge_connection_st.h"
-#include "lib/crypt_ops/crypto_rand.h"
-#include "lib/fs/dir.h"
-#include "feature/dirauth/dirvote.h"
-#include "feature/nodelist/networkstatus.h"
-#include "feature/nodelist/nodelist.h"
#include "core/or/relay.h"
-#include "feature/nodelist/routerparse.h"
+#include "core/or/versions.h"
+#include "feature/dirauth/dirvote.h"
+#include "feature/dirauth/shared_random_state.h"
+#include "feature/dircommon/voting_schedule.h"
+#include "feature/hs/hs_circuit.h"
+#include "feature/hs/hs_circuitmap.h"
+#include "feature/hs/hs_client.h"
#include "feature/hs/hs_common.h"
#include "feature/hs/hs_config.h"
#include "feature/hs/hs_ident.h"
#include "feature/hs/hs_intropoint.h"
-#include "core/crypto/hs_ntor.h"
-#include "feature/hs/hs_circuit.h"
-#include "feature/hs/hs_circuitmap.h"
#include "feature/hs/hs_service.h"
-#include "feature/hs/hs_client.h"
-#include "core/mainloop/mainloop.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
#include "feature/rend/rendservice.h"
-#include "app/config/statefile.h"
-#include "feature/dirauth/shared_random_state.h"
-#include "feature/dircommon/voting_schedule.h"
+#include "lib/crypt_ops/crypto_rand.h"
+#include "lib/fs/dir.h"
#include "core/or/cpath_build_state_st.h"
#include "core/or/crypt_path_st.h"
diff --git a/src/test/test_microdesc.c b/src/test/test_microdesc.c
index ec4779ead1..8ede2690ec 100644
--- a/src/test/test_microdesc.c
+++ b/src/test/test_microdesc.c
@@ -4,13 +4,14 @@
#include "orconfig.h"
#include "core/or/or.h"
-#include "app/config/config.h"
#define DIRVOTE_PRIVATE
+#include "app/config/config.h"
#include "feature/dirauth/dirvote.h"
+#include "feature/dirparse/microdesc_parse.h"
+#include "feature/dirparse/routerparse.h"
#include "feature/nodelist/microdesc.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/routerlist.h"
-#include "feature/nodelist/routerparse.h"
#include "feature/nodelist/torcert.h"
#include "feature/nodelist/microdesc_st.h"
diff --git a/src/test/test_policy.c b/src/test/test_policy.c
index 6a07e5b1f8..afe608f5f7 100644
--- a/src/test/test_policy.c
+++ b/src/test/test_policy.c
@@ -1,19 +1,20 @@
/* Copyright (c) 2013-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "core/or/or.h"
#define CONFIG_PRIVATE
-#include "app/config/config.h"
-#include "feature/relay/router.h"
-#include "feature/nodelist/routerparse.h"
#define POLICIES_PRIVATE
+
+#include "core/or/or.h"
+#include "app/config/config.h"
#include "core/or/policies.h"
+#include "feature/dirparse/policy_parse.h"
+#include "feature/relay/router.h"
#include "lib/encoding/confline.h"
#include "test/test.h"
#include "core/or/addr_policy_st.h"
-#include "feature/nodelist/node_st.h"
#include "core/or/port_cfg_st.h"
+#include "feature/nodelist/node_st.h"
#include "feature/nodelist/routerinfo_st.h"
#include "feature/nodelist/routerstatus_st.h"
diff --git a/src/test/test_routerlist.c b/src/test/test_routerlist.c
index 1086b98612..67af2fd484 100644
--- a/src/test/test_routerlist.c
+++ b/src/test/test_routerlist.c
@@ -33,7 +33,8 @@
#include "feature/nodelist/node_select.h"
#include "feature/nodelist/routerlist.h"
#include "feature/nodelist/routerset.h"
-#include "feature/nodelist/routerparse.h"
+#include "feature/dirparse/authcert_parse.h"
+#include "feature/dirparse/ns_parse.h"
#include "feature/dirauth/shared_random.h"
#include "app/config/statefile.h"
diff --git a/src/test/test_routerset.c b/src/test/test_routerset.c
index fede419f0b..a08adff466 100644
--- a/src/test/test_routerset.c
+++ b/src/test/test_routerset.c
@@ -4,11 +4,11 @@
#define ROUTERSET_PRIVATE
#include "core/or/or.h"
-#include "lib/geoip/geoip.h"
-#include "feature/nodelist/routerset.h"
-#include "feature/nodelist/routerparse.h"
#include "core/or/policies.h"
+#include "feature/dirparse/policy_parse.h"
#include "feature/nodelist/nodelist.h"
+#include "feature/nodelist/routerset.h"
+#include "lib/geoip/geoip.h"
#include "core/or/addr_policy_st.h"
#include "core/or/extend_info_st.h"
diff --git a/src/test/test_shared_random.c b/src/test/test_shared_random.c
index 725724aa56..8a7fb95cc1 100644
--- a/src/test/test_shared_random.c
+++ b/src/test/test_shared_random.c
@@ -19,7 +19,7 @@
#include "feature/relay/routerkeys.h"
#include "feature/nodelist/authcert.h"
#include "feature/nodelist/dirlist.h"
-#include "feature/nodelist/routerparse.h"
+#include "feature/dirparse/authcert_parse.h"
#include "feature/hs_common/shared_random_client.h"
#include "feature/dircommon/voting_schedule.h"