aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/bench.c3
-rw-r--r--src/test/fuzz/fuzz_http.c2
-rw-r--r--src/test/fuzz/fuzz_http_connect.c2
-rw-r--r--src/test/log_test_helpers.c2
-rw-r--r--src/test/test_bridges.c1
-rw-r--r--src/test/test_bt_cl.c2
-rw-r--r--src/test/test_circuitlist.c3
-rw-r--r--src/test/test_containers.c5
-rw-r--r--src/test/test_dir_common.c1
-rw-r--r--src/test/test_entrynodes.c3
-rw-r--r--src/test/test_guardfraction.c1
-rw-r--r--src/test/test_logging.c7
-rw-r--r--src/test/test_routerlist.c1
-rw-r--r--src/test/test_status.c2
-rw-r--r--src/test/test_tortls.c2
-rw-r--r--src/test/test_util.c3
-rw-r--r--src/test/test_util_slow.c2
17 files changed, 24 insertions, 18 deletions
diff --git a/src/test/bench.c b/src/test/bench.c
index 49ac7269ef..3cfdd0ae4f 100644
--- a/src/test/bench.c
+++ b/src/test/bench.c
@@ -29,6 +29,8 @@
#include "or/cell_st.h"
#include "or/or_circuit_st.h"
+#include "lib/container/bloomfilt.h"
+
#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_PROCESS_CPUTIME_ID)
static uint64_t nanostart;
static inline uint64_t
@@ -741,4 +743,3 @@ main(int argc, const char **argv)
return 0;
}
-
diff --git a/src/test/fuzz/fuzz_http.c b/src/test/fuzz/fuzz_http.c
index 564edbb55e..c82c658d97 100644
--- a/src/test/fuzz/fuzz_http.c
+++ b/src/test/fuzz/fuzz_http.c
@@ -12,7 +12,7 @@
#include "or/config.h"
#include "or/connection.h"
#include "or/directory.h"
-#include "common/torlog.h"
+#include "lib/log/torlog.h"
#include "or/dir_connection_st.h"
diff --git a/src/test/fuzz/fuzz_http_connect.c b/src/test/fuzz/fuzz_http_connect.c
index 1cde742f27..32bd261350 100644
--- a/src/test/fuzz/fuzz_http_connect.c
+++ b/src/test/fuzz/fuzz_http_connect.c
@@ -13,7 +13,7 @@
#include "or/connection.h"
#include "or/connection_edge.h"
#include "or/proto_socks.h"
-#include "common/torlog.h"
+#include "lib/log/torlog.h"
#include "or/entry_connection_st.h"
#include "or/socks_request_st.h"
diff --git a/src/test/log_test_helpers.c b/src/test/log_test_helpers.c
index 03429b72cb..e814555ba1 100644
--- a/src/test/log_test_helpers.c
+++ b/src/test/log_test_helpers.c
@@ -1,7 +1,7 @@
/* Copyright (c) 2015-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define LOG_PRIVATE
-#include "common/torlog.h"
+#include "lib/log/torlog.h"
#include "test/log_test_helpers.h"
/**
diff --git a/src/test/test_bridges.c b/src/test/test_bridges.c
index c1de731b2d..7479841407 100644
--- a/src/test/test_bridges.c
+++ b/src/test/test_bridges.c
@@ -15,7 +15,6 @@
#include "common/address.h"
#include "or/bridges.h"
#include "or/config.h"
-#include "common/container.h"
#include "or/transports.h"
#include "common/util.h"
diff --git a/src/test/test_bt_cl.c b/src/test/test_bt_cl.c
index 66dd931e54..c64ca8e2b3 100644
--- a/src/test/test_bt_cl.c
+++ b/src/test/test_bt_cl.c
@@ -10,7 +10,7 @@
#include "or/or.h"
#include "common/util.h"
#include "lib/err/backtrace.h"
-#include "common/torlog.h"
+#include "lib/log/torlog.h"
/* -1: no crash.
* 0: crash with a segmentation fault.
diff --git a/src/test/test_circuitlist.c b/src/test/test_circuitlist.c
index 96de2eed04..4aa7c596ee 100644
--- a/src/test/test_circuitlist.c
+++ b/src/test/test_circuitlist.c
@@ -17,6 +17,8 @@
#include "or/or_circuit_st.h"
#include "or/origin_circuit_st.h"
+#include "lib/container/bitarray.h"
+
static channel_t *
new_fake_channel(void)
{
@@ -470,4 +472,3 @@ struct testcase_t circuitlist_tests[] = {
TT_FORK, NULL, NULL },
END_OF_TESTCASES
};
-
diff --git a/src/test/test_containers.c b/src/test/test_containers.c
index efc6a181fd..f45082be0b 100644
--- a/src/test/test_containers.c
+++ b/src/test/test_containers.c
@@ -9,6 +9,10 @@
#include "or/fp_pair.h"
#include "test/test.h"
+#include "lib/container/bitarray.h"
+#include "lib/container/bloomfilt.h"
+#include "lib/container/order.h"
+
/** Helper: return a tristate based on comparing the strings in *<b>a</b> and
* *<b>b</b>. */
static int
@@ -1295,4 +1299,3 @@ struct testcase_t container_tests[] = {
CONTAINER(smartlist_strings_eq, 0),
END_OF_TESTCASES
};
-
diff --git a/src/test/test_dir_common.c b/src/test/test_dir_common.c
index 6933800eb8..a758421cde 100644
--- a/src/test/test_dir_common.c
+++ b/src/test/test_dir_common.c
@@ -6,7 +6,6 @@
#include "orconfig.h"
#define DIRVOTE_PRIVATE
#include "test/test.h"
-#include "common/container.h"
#include "or/or.h"
#include "or/dirauth/dirvote.h"
#include "or/nodelist.h"
diff --git a/src/test/test_entrynodes.c b/src/test/test_entrynodes.c
index 2391e10cd6..4d37d0fe88 100644
--- a/src/test/test_entrynodes.c
+++ b/src/test/test_entrynodes.c
@@ -43,6 +43,8 @@
#include "test/test_helpers.h"
#include "test/log_test_helpers.h"
+#include "lib/container/bloomfilt.h"
+
/* TODO:
* choose_random_entry() test with state set.
*
@@ -3074,4 +3076,3 @@ struct testcase_t entrynodes_tests[] = {
END_OF_TESTCASES
};
-
diff --git a/src/test/test_guardfraction.c b/src/test/test_guardfraction.c
index fc451b1629..b7737cafa8 100644
--- a/src/test/test_guardfraction.c
+++ b/src/test/test_guardfraction.c
@@ -9,7 +9,6 @@
#include "or/or.h"
#include "or/config.h"
#include "or/dirserv.h"
-#include "common/container.h"
#include "or/entrynodes.h"
#include "common/util.h"
#include "or/routerparse.h"
diff --git a/src/test/test_logging.c b/src/test/test_logging.c
index d31c70437e..06744ebf2c 100644
--- a/src/test/test_logging.c
+++ b/src/test/test_logging.c
@@ -1,10 +1,13 @@
/* Copyright (c) 2013-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
+#define CONFIG_PRIVATE
+
#include "orconfig.h"
#include "or/or.h"
+#include "or/config.h"
#include "lib/err/torerr.h"
-#include "common/torlog.h"
+#include "lib/log/torlog.h"
#include "test/test.h"
static void
@@ -90,7 +93,7 @@ test_sigsafe_err(void *arg)
init_logging(1);
mark_logs_temp();
- add_file_log(&include_bug, fn, 0);
+ open_and_add_file_log(&include_bug, fn, 0);
tor_log_update_sigsafe_err_fds();
close_temp_logs();
diff --git a/src/test/test_routerlist.c b/src/test/test_routerlist.c
index e8f8478330..5da42c1339 100644
--- a/src/test/test_routerlist.c
+++ b/src/test/test_routerlist.c
@@ -16,7 +16,6 @@
#include "or/or.h"
#include "or/config.h"
#include "or/connection.h"
-#include "common/container.h"
#include "or/control.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "or/directory.h"
diff --git a/src/test/test_status.c b/src/test/test_status.c
index 2f305224cb..09b9662b4c 100644
--- a/src/test/test_status.c
+++ b/src/test/test_status.c
@@ -12,7 +12,7 @@
#include <math.h>
#include "or/or.h"
-#include "common/torlog.h"
+#include "lib/log/torlog.h"
#include "tor_queue.h"
#include "or/status.h"
#include "or/circuitlist.h"
diff --git a/src/test/test_tortls.c b/src/test/test_tortls.c
index 80f95b6c08..f1b9b99f58 100644
--- a/src/test/test_tortls.c
+++ b/src/test/test_tortls.c
@@ -31,7 +31,7 @@ DISABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING(redundant-decls)
#include "or/or.h"
-#include "common/torlog.h"
+#include "lib/log/torlog.h"
#include "or/config.h"
#include "lib/tls/tortls.h"
diff --git a/src/test/test_util.c b/src/test/test_util.c
index a766f8457f..73f353a3ff 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -8,6 +8,7 @@
#define COMPAT_TIME_PRIVATE
#define CONTROL_PRIVATE
#define UTIL_PRIVATE
+#define UTIL_MALLOC_PRIVATE
#include "or/or.h"
#include "common/buffers.h"
#include "or/config.h"
@@ -18,6 +19,7 @@
#include "common/util_process.h"
#include "test/log_test_helpers.h"
#include "lib/compress/compress_zstd.h"
+#include "lib/fdio/fdio.h"
#ifdef HAVE_PWD_H
#include <pwd.h>
@@ -6316,4 +6318,3 @@ struct testcase_t util_tests[] = {
UTIL_TEST(get_unquoted_path, 0),
END_OF_TESTCASES
};
-
diff --git a/src/test/test_util_slow.c b/src/test/test_util_slow.c
index 9e4d7b0a10..9fbcd9d2b3 100644
--- a/src/test/test_util_slow.c
+++ b/src/test/test_util_slow.c
@@ -8,7 +8,7 @@
#include "common/util.h"
#include "common/util_process.h"
#include "lib/crypt_ops/crypto.h"
-#include "common/torlog.h"
+#include "lib/log/torlog.h"
#include "test/test.h"
#ifndef BUILDDIR