summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-21 10:26:57 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-21 12:57:22 -0400
commit194acfb51d9b26ae63f9d48d3442c4ff64cbc8cc (patch)
treeb4438cb70d5029db0a7b00fb8865a068737a1cb8 /src/test
parent0e4c42a912d020888e811b748925362e1b3dc67b (diff)
downloadtor-194acfb51d9b26ae63f9d48d3442c4ff64cbc8cc.tar.gz
tor-194acfb51d9b26ae63f9d48d3442c4ff64cbc8cc.zip
Split directory.c code into several modules
Parts of this C file naturally belong in dircache, dirclient, and dircommon: so, move them there.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/fuzz/fuzz_http.c5
-rw-r--r--src/test/test_connection.c2
-rw-r--r--src/test/test_dir.c8
-rw-r--r--src/test/test_dir_handle_get.c4
-rw-r--r--src/test/test_entrynodes.c5
-rw-r--r--src/test/test_hs_cache.c6
-rw-r--r--src/test/test_hs_client.c2
-rw-r--r--src/test/test_hs_common.c2
-rw-r--r--src/test/test_oos.c2
-rw-r--r--src/test/test_routerlist.c5
10 files changed, 26 insertions, 15 deletions
diff --git a/src/test/fuzz/fuzz_http.c b/src/test/fuzz/fuzz_http.c
index 2fbb275614..06483282bc 100644
--- a/src/test/fuzz/fuzz_http.c
+++ b/src/test/fuzz/fuzz_http.c
@@ -4,14 +4,14 @@
#include "orconfig.h"
#define BUFFERS_PRIVATE
-#define DIRECTORY_PRIVATE
+#define DIRCACHE_PRIVATE
#include "core/or/or.h"
#include "lib/err/backtrace.h"
#include "lib/container/buffers.h"
#include "app/config/config.h"
#include "core/mainloop/connection.h"
-#include "feature/dircache/directory.h"
+#include "feature/dircache/dircache.h"
#include "lib/log/log.h"
#include "feature/dircommon/dir_connection_st.h"
@@ -132,4 +132,3 @@ fuzz_main(const uint8_t *stdin_buf, size_t data_size)
return 0;
}
-
diff --git a/src/test/test_connection.c b/src/test/test_connection.c
index d85ede61b1..0013f47fbc 100644
--- a/src/test/test_connection.c
+++ b/src/test/test_connection.c
@@ -18,7 +18,7 @@
#include "feature/nodelist/nodelist.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/rend/rendcache.h"
-#include "feature/dircache/directory.h"
+#include "feature/dircommon/directory.h"
#include "core/or/connection_or.h"
#include "lib/net/resolve.h"
diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index b2c3f4426c..686b039492 100644
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@ -9,8 +9,11 @@
#define BWAUTH_PRIVATE
#define CONFIG_PRIVATE
#define CONTROL_PRIVATE
+#define DIRCACHE_PRIVATE
+#define DIRCLIENT_PRIVATE
#define DIRSERV_PRIVATE
#define DIRVOTE_PRIVATE
+#define DLSTATUS_PRIVATE
#define HIBERNATE_PRIVATE
#define NETWORKSTATUS_PRIVATE
#define NODE_SELECT_PRIVATE
@@ -30,8 +33,11 @@
#include "lib/crypt_ops/crypto_ed25519.h"
#include "lib/crypt_ops/crypto_format.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "feature/dircache/directory.h"
+#include "feature/dircommon/directory.h"
+#include "feature/dirclient/dirclient.h"
+#include "feature/dirclient/dlstatus.h"
#include "feature/dirauth/bwauth.h"
+#include "feature/dircache/dircache.h"
#include "feature/dircache/dirserv.h"
#include "feature/dirauth/process_descs.h"
#include "feature/dirauth/dirvote.h"
diff --git a/src/test/test_dir_handle_get.c b/src/test/test_dir_handle_get.c
index 2cfed16b51..f05b0fc79f 100644
--- a/src/test/test_dir_handle_get.c
+++ b/src/test/test_dir_handle_get.c
@@ -8,12 +8,14 @@
#define CONNECTION_PRIVATE
#define CONFIG_PRIVATE
#define RENDCACHE_PRIVATE
+#define DIRCACHE_PRIVATE
#include "core/or/or.h"
#include "app/config/config.h"
#include "core/mainloop/connection.h"
#include "feature/dircache/consdiffmgr.h"
-#include "feature/dircache/directory.h"
+#include "feature/dircommon/directory.h"
+#include "feature/dircache/dircache.h"
#include "test/test.h"
#include "lib/compress/compress.h"
#include "feature/rend/rendcommon.h"
diff --git a/src/test/test_entrynodes.c b/src/test/test_entrynodes.c
index cb694106c4..ebe9accf5a 100644
--- a/src/test/test_entrynodes.c
+++ b/src/test/test_entrynodes.c
@@ -8,7 +8,7 @@
#define STATEFILE_PRIVATE
#define ENTRYNODES_PRIVATE
#define ROUTERLIST_PRIVATE
-#define DIRECTORY_PRIVATE
+#define DIRCLIENT_PRIVATE
#include "core/or/or.h"
#include "test/test.h"
@@ -19,7 +19,8 @@
#include "app/config/config.h"
#include "app/config/confparse.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "feature/dircache/directory.h"
+#include "feature/dircommon/directory.h"
+#include "feature/dirclient/dirclient.h"
#include "feature/client/entrynodes.h"
#include "feature/nodelist/nodelist.h"
#include "feature/nodelist/networkstatus.h"
diff --git a/src/test/test_hs_cache.c b/src/test/test_hs_cache.c
index 728bb4a2f5..203a1d7039 100644
--- a/src/test/test_hs_cache.c
+++ b/src/test/test_hs_cache.c
@@ -7,13 +7,15 @@
*/
#define CONNECTION_PRIVATE
-#define DIRECTORY_PRIVATE
+#define DIRCACHE_PRIVATE
+#define DIRCLIENT_PRIVATE
#define HS_CACHE_PRIVATE
#include "trunnel/ed25519_cert.h"
#include "feature/hs/hs_cache.h"
#include "feature/rend/rendcache.h"
-#include "feature/dircache/directory.h"
+#include "feature/dircache/dircache.h"
+#include "feature/dirclient/dirclient.h"
#include "feature/nodelist/networkstatus.h"
#include "core/mainloop/connection.h"
#include "core/proto/proto_http.h"
diff --git a/src/test/test_hs_client.c b/src/test/test_hs_client.c
index 31a2816c12..25cb991a79 100644
--- a/src/test/test_hs_client.c
+++ b/src/test/test_hs_client.c
@@ -25,7 +25,7 @@
#include "lib/crypt_ops/crypto_cipher.h"
#include "lib/crypt_ops/crypto_dh.h"
#include "core/or/channeltls.h"
-#include "feature/dircache/directory.h"
+#include "feature/dircommon/directory.h"
#include "core/mainloop/mainloop.h"
#include "feature/nodelist/nodelist.h"
#include "feature/nodelist/routerset.h"
diff --git a/src/test/test_hs_common.c b/src/test/test_hs_common.c
index c60d6e2640..95f7ed14ba 100644
--- a/src/test/test_hs_common.c
+++ b/src/test/test_hs_common.c
@@ -24,7 +24,7 @@
#include "feature/hs/hs_service.h"
#include "app/config/config.h"
#include "feature/nodelist/networkstatus.h"
-#include "feature/dircache/directory.h"
+#include "feature/dirclient/dirclient.h"
#include "feature/dirauth/dirvote.h"
#include "feature/nodelist/nodelist.h"
#include "feature/nodelist/routerlist.h"
diff --git a/src/test/test_oos.c b/src/test/test_oos.c
index b8ff3030a2..fb0daa7a8d 100644
--- a/src/test/test_oos.c
+++ b/src/test/test_oos.c
@@ -9,7 +9,7 @@
#include "app/config/config.h"
#include "core/mainloop/connection.h"
#include "core/or/connection_or.h"
-#include "feature/dircache/directory.h"
+#include "feature/dircommon/directory.h"
#include "core/mainloop/mainloop.h"
#include "test/test.h"
diff --git a/src/test/test_routerlist.c b/src/test/test_routerlist.c
index f629596c5b..1086b98612 100644
--- a/src/test/test_routerlist.c
+++ b/src/test/test_routerlist.c
@@ -6,7 +6,7 @@
#include <time.h>
#define CONNECTION_PRIVATE
-#define DIRECTORY_PRIVATE
+#define DIRCLIENT_PRIVATE
#define DIRVOTE_PRIVATE
#define ENTRYNODES_PRIVATE
#define HIBERNATE_PRIVATE
@@ -19,7 +19,8 @@
#include "core/mainloop/connection.h"
#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "feature/dircache/directory.h"
+#include "feature/dircommon/directory.h"
+#include "feature/dirclient/dirclient.h"
#include "feature/dirauth/dirvote.h"
#include "feature/client/entrynodes.h"
#include "feature/hibernate/hibernate.h"