summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-21 13:57:13 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-21 13:57:13 -0400
commit8918bd90e9ddc135c0519177a07cd7a8c18859ed (patch)
treedec556e3289d121b085b620f14a68dea70786b7d /src/test
parent471418befb9d1b30b17acd1e07a9d3de034db261 (diff)
parent3305ae50442aaed13a9e15c392439c348e6182be (diff)
downloadtor-8918bd90e9ddc135c0519177a07cd7a8c18859ed.tar.gz
tor-8918bd90e9ddc135c0519177a07cd7a8c18859ed.zip
Merge branch 'extract_easy_common_libs'
Diffstat (limited to 'src/test')
-rw-r--r--src/test/bench.c6
-rw-r--r--src/test/fuzz/fuzz_hsdescv3.c2
-rw-r--r--src/test/fuzz/fuzzing_common.c4
-rw-r--r--src/test/hs_test_helpers.c2
-rw-r--r--src/test/include.am1
-rw-r--r--src/test/rend_test_helpers.c2
-rw-r--r--src/test/test-memwipe.c2
-rw-r--r--src/test/test-timers.c2
-rw-r--r--src/test/test.c8
-rw-r--r--src/test/test.h2
-rw-r--r--src/test/test_addr.c2
-rw-r--r--src/test/test_address_set.c2
-rw-r--r--src/test/test_buffers.c4
-rw-r--r--src/test/test_cell_formats.c2
-rw-r--r--src/test/test_channel.c2
-rw-r--r--src/test/test_channelpadding.c2
-rw-r--r--src/test/test_channeltls.c2
-rw-r--r--src/test/test_consdiffmgr.c2
-rw-r--r--src/test/test_containers.c2
-rw-r--r--src/test/test_crypto.c8
-rw-r--r--src/test/test_crypto_openssl.c4
-rw-r--r--src/test/test_crypto_slow.c6
-rw-r--r--src/test/test_dir.c4
-rw-r--r--src/test/test_dir_handle_get.c2
-rw-r--r--src/test/test_dos.c2
-rw-r--r--src/test/test_entrynodes.c2
-rw-r--r--src/test/test_extorport.c2
-rw-r--r--src/test/test_helpers.c2
-rw-r--r--src/test/test_hs_cell.c4
-rw-r--r--src/test/test_hs_client.c2
-rw-r--r--src/test/test_hs_common.c2
-rw-r--r--src/test/test_hs_descriptor.c6
-rw-r--r--src/test/test_hs_intropoint.c2
-rw-r--r--src/test/test_hs_ntor_cl.c4
-rw-r--r--src/test/test_hs_service.c2
-rw-r--r--src/test/test_introduce.c2
-rw-r--r--src/test/test_nodelist.c2
-rw-r--r--src/test/test_ntor_cl.c4
-rw-r--r--src/test/test_oom.c2
-rw-r--r--src/test/test_pubsub.c85
-rw-r--r--src/test/test_relaycell.c2
-rw-r--r--src/test/test_relaycrypt.c2
-rw-r--r--src/test/test_router.c4
-rw-r--r--src/test/test_routerkeys.c2
-rw-r--r--src/test/test_routerlist.c2
-rw-r--r--src/test/test_shared_random.c2
-rw-r--r--src/test/test_storagedir.c2
-rw-r--r--src/test/test_tortls.c2
-rw-r--r--src/test/test_util.c4
-rw-r--r--src/test/test_util_format.c2
-rw-r--r--src/test/test_util_slow.c2
-rw-r--r--src/test/test_workqueue.c4
-rw-r--r--src/test/testing_common.c2
-rw-r--r--src/test/testing_rsakeys.c2
54 files changed, 72 insertions, 162 deletions
diff --git a/src/test/bench.c b/src/test/bench.c
index f54d8f5c60..49ac7269ef 100644
--- a/src/test/bench.c
+++ b/src/test/bench.c
@@ -20,10 +20,10 @@
#include <openssl/obj_mac.h>
#include "or/config.h"
-#include "common/crypto_curve25519.h"
+#include "lib/crypt_ops/crypto_curve25519.h"
#include "or/onion_ntor.h"
-#include "common/crypto_ed25519.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_ed25519.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/consdiff.h"
#include "or/cell_st.h"
diff --git a/src/test/fuzz/fuzz_hsdescv3.c b/src/test/fuzz/fuzz_hsdescv3.c
index d1ef34b6b3..ada9fa6c2d 100644
--- a/src/test/fuzz/fuzz_hsdescv3.c
+++ b/src/test/fuzz/fuzz_hsdescv3.c
@@ -6,7 +6,7 @@
#include "or/or.h"
#include "trunnel/ed25519_cert.h" /* Trunnel interface. */
-#include "common/crypto_ed25519.h"
+#include "lib/crypt_ops/crypto_ed25519.h"
#include "or/hs_descriptor.h"
#include "or/routerparse.h"
#include "common/util.h"
diff --git a/src/test/fuzz/fuzzing_common.c b/src/test/fuzz/fuzzing_common.c
index 12ebd97bd6..9e736ea69d 100644
--- a/src/test/fuzz/fuzzing_common.c
+++ b/src/test/fuzz/fuzzing_common.c
@@ -6,8 +6,8 @@
#include "lib/err/backtrace.h"
#include "or/config.h"
#include "test/fuzz/fuzzing.h"
-#include "common/crypto.h"
-#include "common/crypto_ed25519.h"
+#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_ed25519.h"
static or_options_t *mock_options = NULL;
static const or_options_t *
diff --git a/src/test/hs_test_helpers.c b/src/test/hs_test_helpers.c
index ea12970b92..d238bf8e59 100644
--- a/src/test/hs_test_helpers.c
+++ b/src/test/hs_test_helpers.c
@@ -2,7 +2,7 @@
/* See LICENSE for licensing information */
#include "or/or.h"
-#include "common/crypto_ed25519.h"
+#include "lib/crypt_ops/crypto_ed25519.h"
#include "test/test.h"
#include "or/torcert.h"
diff --git a/src/test/include.am b/src/test/include.am
index 0f0dc6a7f5..7e5ad46117 100644
--- a/src/test/include.am
+++ b/src/test/include.am
@@ -157,7 +157,6 @@ src_test_test_SOURCES += \
src/test/test_proto_misc.c \
src/test/test_protover.c \
src/test/test_pt.c \
- src/test/test_pubsub.c \
src/test/test_relay.c \
src/test/test_relaycell.c \
src/test/test_relaycrypt.c \
diff --git a/src/test/rend_test_helpers.c b/src/test/rend_test_helpers.c
index 6f0c1c121b..31af58c278 100644
--- a/src/test/rend_test_helpers.c
+++ b/src/test/rend_test_helpers.c
@@ -2,7 +2,7 @@
/* See LICENSE for licensing information */
#include "or/or.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "test/test.h"
#include "or/rendcommon.h"
#include "test/rend_test_helpers.h"
diff --git a/src/test/test-memwipe.c b/src/test/test-memwipe.c
index a8326aa671..16bb017c89 100644
--- a/src/test/test-memwipe.c
+++ b/src/test/test-memwipe.c
@@ -7,7 +7,7 @@
#include <sys/types.h>
#include <stdlib.h>
-#include "common/crypto_util.h"
+#include "lib/crypt_ops/crypto_util.h"
#include "common/compat.h"
#include "common/util.h"
diff --git a/src/test/test-timers.c b/src/test/test-timers.c
index 1953ea5e31..70f07fba47 100644
--- a/src/test/test-timers.c
+++ b/src/test/test-timers.c
@@ -9,7 +9,7 @@
#include "common/compat.h"
#include "common/compat_libevent.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "common/timers.h"
#include "common/util.h"
diff --git a/src/test/test.c b/src/test/test.c
index 8bdeb60bd9..1a3f4f8eb2 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -9,7 +9,7 @@
**/
#include "orconfig.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include <stdio.h>
#ifdef HAVE_FCNTL_H
@@ -44,7 +44,7 @@ double fabs(double x);
#include "common/buffers.h"
#include "or/circuitlist.h"
#include "or/circuitstats.h"
-#include "common/compress.h"
+#include "lib/compress/compress.h"
#include "or/config.h"
#include "or/connection_edge.h"
#include "or/rendcommon.h"
@@ -60,7 +60,7 @@ double fabs(double x);
#include "or/rephist.h"
#include "or/routerparse.h"
#include "or/statefile.h"
-#include "common/crypto_curve25519.h"
+#include "lib/crypt_ops/crypto_curve25519.h"
#include "or/extend_info_st.h"
#include "or/or_circuit_st.h"
@@ -917,10 +917,8 @@ struct testgroup_t testgroups[] = {
{ "util/format/", util_format_tests },
{ "util/logging/", logging_tests },
{ "util/process/", util_process_tests },
- { "util/pubsub/", pubsub_tests },
{ "util/thread/", thread_tests },
{ "util/handle/", handle_tests },
{ "dns/", dns_tests },
END_OF_GROUPS
};
-
diff --git a/src/test/test.h b/src/test/test.h
index 29e6544697..9abd46008d 100644
--- a/src/test/test.h
+++ b/src/test/test.h
@@ -248,7 +248,6 @@ extern struct testcase_t procmon_tests[];
extern struct testcase_t proto_http_tests[];
extern struct testcase_t proto_misc_tests[];
extern struct testcase_t protover_tests[];
-extern struct testcase_t pubsub_tests[];
extern struct testcase_t pt_tests[];
extern struct testcase_t relay_tests[];
extern struct testcase_t relaycell_tests[];
@@ -292,4 +291,3 @@ extern const char AUTHORITY_SIGNKEY_C_DIGEST[];
extern const char AUTHORITY_SIGNKEY_C_DIGEST256[];
#endif /* !defined(TOR_TEST_H) */
-
diff --git a/src/test/test_addr.c b/src/test/test_addr.c
index 6778fde974..0a3212adbc 100644
--- a/src/test/test_addr.c
+++ b/src/test/test_addr.c
@@ -6,7 +6,7 @@
#define ADDRESSMAP_PRIVATE
#include "orconfig.h"
#include "or/or.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "test/test.h"
#include "or/addressmap.h"
#include "test/log_test_helpers.h"
diff --git a/src/test/test_address_set.c b/src/test/test_address_set.c
index 1df7b34422..3699685848 100644
--- a/src/test/test_address_set.c
+++ b/src/test/test_address_set.c
@@ -2,7 +2,7 @@
/* See LICENSE for licensing information */
#include "or/or.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "common/address_set.h"
#include "or/microdesc.h"
#include "or/networkstatus.h"
diff --git a/src/test/test_buffers.c b/src/test/test_buffers.c
index cd4c9d0aef..080325538f 100644
--- a/src/test/test_buffers.c
+++ b/src/test/test_buffers.c
@@ -7,8 +7,8 @@
#define PROTO_HTTP_PRIVATE
#include "or/or.h"
#include "common/buffers.h"
-#include "common/buffers_tls.h"
-#include "common/crypto_rand.h"
+#include "lib/tls/buffers_tls.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/proto_http.h"
#include "or/proto_socks.h"
#include "test/test.h"
diff --git a/src/test/test_cell_formats.c b/src/test/test_cell_formats.c
index 685b6efc36..844fa4a16c 100644
--- a/src/test/test_cell_formats.c
+++ b/src/test/test_cell_formats.c
@@ -12,7 +12,7 @@
#include "or/connection_edge.h"
#include "or/connection_or.h"
#include "or/config.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/onion.h"
#include "or/onion_tap.h"
#include "or/onion_fast.h"
diff --git a/src/test/test_channel.c b/src/test/test_channel.c
index 5b30c71123..d236580fbd 100644
--- a/src/test/test_channel.c
+++ b/src/test/test_channel.c
@@ -12,7 +12,7 @@
#include "or/circuitmux_ewma.h"
/* For var_cell_free */
#include "or/connection_or.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
/* For packed_cell stuff */
#define RELAY_PRIVATE
#include "or/relay.h"
diff --git a/src/test/test_channelpadding.c b/src/test/test_channelpadding.c
index b48bf0f162..7edfdc114a 100644
--- a/src/test/test_channelpadding.c
+++ b/src/test/test_channelpadding.c
@@ -7,7 +7,7 @@
#define TOR_TIMERS_PRIVATE
#include "or/or.h"
#include "test/test.h"
-#include "common/testsupport.h"
+#include "lib/testsupport/testsupport.h"
#include "or/connection.h"
#include "or/connection_or.h"
#include "or/channel.h"
diff --git a/src/test/test_channeltls.c b/src/test/test_channeltls.c
index 08fec2de24..58bfaff688 100644
--- a/src/test/test_channeltls.c
+++ b/src/test/test_channeltls.c
@@ -15,7 +15,7 @@
#include "or/config.h"
/* For init/free stuff */
#include "or/scheduler.h"
-#include "common/tortls.h"
+#include "lib/tls/tortls.h"
#include "or/or_connection_st.h"
diff --git a/src/test/test_consdiffmgr.c b/src/test/test_consdiffmgr.c
index c4b89ddf03..c09586afcc 100644
--- a/src/test/test_consdiffmgr.c
+++ b/src/test/test_consdiffmgr.c
@@ -9,7 +9,7 @@
#include "or/consdiff.h"
#include "or/consdiffmgr.h"
#include "or/cpuworker.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/networkstatus.h"
#include "or/routerparse.h"
#include "common/workqueue.h"
diff --git a/src/test/test_containers.c b/src/test/test_containers.c
index 1d5ee4fc97..efc6a181fd 100644
--- a/src/test/test_containers.c
+++ b/src/test/test_containers.c
@@ -5,7 +5,7 @@
#include "orconfig.h"
#include "or/or.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/fp_pair.h"
#include "test/test.h"
diff --git a/src/test/test_crypto.c b/src/test/test_crypto.c
index c580a1945c..e8a2efe597 100644
--- a/src/test/test_crypto.c
+++ b/src/test/test_crypto.c
@@ -8,12 +8,12 @@
#define CRYPTO_RAND_PRIVATE
#include "or/or.h"
#include "test/test.h"
-#include "common/aes.h"
+#include "lib/crypt_ops/aes.h"
#include "common/util.h"
#include "siphash.h"
-#include "common/crypto_curve25519.h"
-#include "common/crypto_ed25519.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_curve25519.h"
+#include "lib/crypt_ops/crypto_ed25519.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "ed25519_vectors.inc"
/** Run unit tests for Diffie-Hellman functionality. */
diff --git a/src/test/test_crypto_openssl.c b/src/test/test_crypto_openssl.c
index f33ed58d40..cc817ad702 100644
--- a/src/test/test_crypto_openssl.c
+++ b/src/test/test_crypto_openssl.c
@@ -7,7 +7,7 @@
#define CRYPTO_RAND_PRIVATE
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "common/util.h"
#include "common/util_format.h"
#include "common/compat.h"
@@ -15,7 +15,7 @@
#include <openssl/evp.h>
#include <openssl/rand.h>
-#include "common/compat_openssl.h"
+#include "lib/crypt_ops/compat_openssl.h"
/* Test for rectifying openssl RAND engine. */
static void
diff --git a/src/test/test_crypto_slow.c b/src/test/test_crypto_slow.c
index c15d8deb9e..9878a0d026 100644
--- a/src/test/test_crypto_slow.c
+++ b/src/test/test_crypto_slow.c
@@ -7,9 +7,9 @@
#define CRYPTO_S2K_PRIVATE
#include "or/or.h"
#include "test/test.h"
-#include "common/crypto_s2k.h"
-#include "common/crypto_pwbox.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_s2k.h"
+#include "lib/crypt_ops/crypto_pwbox.h"
+#include "lib/crypt_ops/crypto_rand.h"
#if defined(HAVE_LIBSCRYPT_H) && defined(HAVE_LIBSCRYPT_SCRYPT)
#define HAVE_LIBSCRYPT
diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index 56293b5787..9578ba1d33 100644
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@ -22,8 +22,8 @@
#include "or/confparse.h"
#include "or/config.h"
#include "or/control.h"
-#include "common/crypto_ed25519.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_ed25519.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/directory.h"
#include "or/dirserv.h"
#include "or/dirauth/dirvote.h"
diff --git a/src/test/test_dir_handle_get.c b/src/test/test_dir_handle_get.c
index fbc14e3d30..90ca7d357c 100644
--- a/src/test/test_dir_handle_get.c
+++ b/src/test/test_dir_handle_get.c
@@ -15,7 +15,7 @@
#include "or/consdiffmgr.h"
#include "or/directory.h"
#include "test/test.h"
-#include "common/compress.h"
+#include "lib/compress/compress.h"
#include "or/rendcommon.h"
#include "or/rendcache.h"
#include "or/router.h"
diff --git a/src/test/test_dos.c b/src/test/test_dos.c
index 7a2a87d32d..4ba24292ca 100644
--- a/src/test/test_dos.c
+++ b/src/test/test_dos.c
@@ -8,7 +8,7 @@
#include "or/or.h"
#include "or/dos.h"
#include "or/circuitlist.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/geoip.h"
#include "or/channel.h"
#include "or/microdesc.h"
diff --git a/src/test/test_entrynodes.c b/src/test/test_entrynodes.c
index 2af9c4a378..2391e10cd6 100644
--- a/src/test/test_entrynodes.c
+++ b/src/test/test_entrynodes.c
@@ -18,7 +18,7 @@
#include "or/circuitbuild.h"
#include "or/config.h"
#include "or/confparse.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/directory.h"
#include "or/entrynodes.h"
#include "or/nodelist.h"
diff --git a/src/test/test_extorport.c b/src/test/test_extorport.c
index 64ecd422f5..3e99961ce5 100644
--- a/src/test/test_extorport.c
+++ b/src/test/test_extorport.c
@@ -10,7 +10,7 @@
#include "or/connection_or.h"
#include "or/config.h"
#include "or/control.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/ext_orport.h"
#include "or/main.h"
diff --git a/src/test/test_helpers.c b/src/test/test_helpers.c
index f346c15caa..2b1c33aa62 100644
--- a/src/test/test_helpers.c
+++ b/src/test/test_helpers.c
@@ -18,7 +18,7 @@
#include "or/config.h"
#include "or/confparse.h"
#include "or/connection.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/main.h"
#include "or/nodelist.h"
#include "or/relay.h"
diff --git a/src/test/test_hs_cell.c b/src/test/test_hs_cell.c
index f9d25ca099..4bb3c3f77d 100644
--- a/src/test/test_hs_cell.c
+++ b/src/test/test_hs_cell.c
@@ -13,8 +13,8 @@
#include "test/test_helpers.h"
#include "test/log_test_helpers.h"
-#include "common/crypto_ed25519.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_ed25519.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/hs_cell.h"
#include "or/hs_intropoint.h"
#include "or/hs_service.h"
diff --git a/src/test/test_hs_client.c b/src/test/test_hs_client.c
index ebe75d5aa0..58002d6292 100644
--- a/src/test/test_hs_client.c
+++ b/src/test/test_hs_client.c
@@ -21,7 +21,7 @@
#include "test/hs_test_helpers.h"
#include "or/config.h"
-#include "common/crypto.h"
+#include "lib/crypt_ops/crypto.h"
#include "or/channeltls.h"
#include "or/main.h"
#include "or/nodelist.h"
diff --git a/src/test/test_hs_common.c b/src/test/test_hs_common.c
index 1822d6c21c..6296a709dc 100644
--- a/src/test/test_hs_common.c
+++ b/src/test/test_hs_common.c
@@ -17,7 +17,7 @@
#include "test/hs_test_helpers.h"
#include "or/connection_edge.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/hs_common.h"
#include "or/hs_client.h"
#include "or/hs_service.h"
diff --git a/src/test/test_hs_descriptor.c b/src/test/test_hs_descriptor.c
index 00b25f142f..5cc0e99c60 100644
--- a/src/test/test_hs_descriptor.c
+++ b/src/test/test_hs_descriptor.c
@@ -8,9 +8,9 @@
#define HS_DESCRIPTOR_PRIVATE
-#include "common/crypto_ed25519.h"
-#include "common/crypto_digest.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_ed25519.h"
+#include "lib/crypt_ops/crypto_digest.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "trunnel/ed25519_cert.h"
#include "or/or.h"
#include "or/hs_descriptor.h"
diff --git a/src/test/test_hs_intropoint.c b/src/test/test_hs_intropoint.c
index 34e51cba61..843f39423b 100644
--- a/src/test/test_hs_intropoint.c
+++ b/src/test/test_hs_intropoint.c
@@ -13,7 +13,7 @@
#include "test/test.h"
#include "test/log_test_helpers.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/or.h"
#include "or/circuitlist.h"
diff --git a/src/test/test_hs_ntor_cl.c b/src/test/test_hs_ntor_cl.c
index 8c19877729..9b59f0ddb6 100644
--- a/src/test/test_hs_ntor_cl.c
+++ b/src/test/test_hs_ntor_cl.c
@@ -16,8 +16,8 @@
#include "or/or.h"
#include "common/util.h"
#include "common/compat.h"
-#include "common/crypto.h"
-#include "common/crypto_curve25519.h"
+#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_curve25519.h"
#include "or/hs_ntor.h"
#include "or/onion_ntor.h"
diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c
index bcf72b4546..684ac98f42 100644
--- a/src/test/test_hs_service.c
+++ b/src/test/test_hs_service.c
@@ -33,7 +33,7 @@
#include "or/circuitbuild.h"
#include "or/circuitlist.h"
#include "or/circuituse.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/dirauth/dirvote.h"
#include "or/networkstatus.h"
#include "or/nodelist.h"
diff --git a/src/test/test_introduce.c b/src/test/test_introduce.c
index 6ffb22fcac..f62c7f8808 100644
--- a/src/test/test_introduce.c
+++ b/src/test/test_introduce.c
@@ -2,7 +2,7 @@
/* See LICENSE for licensing information */
#include "orconfig.h"
-#include "common/crypto.h"
+#include "lib/crypt_ops/crypto.h"
#include "or/or.h"
#include "test/test.h"
diff --git a/src/test/test_nodelist.c b/src/test/test_nodelist.c
index 0e5ad7bba7..1dc8bc2d24 100644
--- a/src/test/test_nodelist.c
+++ b/src/test/test_nodelist.c
@@ -7,7 +7,7 @@
**/
#include "or/or.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/networkstatus.h"
#include "or/nodelist.h"
#include "or/torcert.h"
diff --git a/src/test/test_ntor_cl.c b/src/test/test_ntor_cl.c
index dbc607db3d..a10cd7e9b5 100644
--- a/src/test/test_ntor_cl.c
+++ b/src/test/test_ntor_cl.c
@@ -9,8 +9,8 @@
#include "or/or.h"
#include "common/util.h"
#include "common/compat.h"
-#include "common/crypto.h"
-#include "common/crypto_curve25519.h"
+#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_curve25519.h"
#include "or/onion_ntor.h"
#define N_ARGS(n) STMT_BEGIN { \
diff --git a/src/test/test_oom.c b/src/test/test_oom.c
index 0edc22c502..c78ec4099f 100644
--- a/src/test/test_oom.c
+++ b/src/test/test_oom.c
@@ -13,7 +13,7 @@
#include "common/compat_libevent.h"
#include "or/connection.h"
#include "or/config.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/relay.h"
#include "test/test.h"
#include "test/test_helpers.h"
diff --git a/src/test/test_pubsub.c b/src/test/test_pubsub.c
deleted file mode 100644
index 4f6cdc1996..0000000000
--- a/src/test/test_pubsub.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Copyright (c) 2016-2018, The Tor Project, Inc. */
-/* See LICENSE for licensing information */
-
-/**
- * \file test_pubsub.c
- * \brief Unit tests for publish-subscribe abstraction.
- **/
-
-#include "or/or.h"
-#include "test/test.h"
-#include "common/pubsub.h"
-
-DECLARE_PUBSUB_STRUCT_TYPES(foobar)
-DECLARE_PUBSUB_TOPIC(foobar)
-DECLARE_NOTIFY_PUBSUB_TOPIC(static, foobar)
-IMPLEMENT_PUBSUB_TOPIC(static, foobar)
-
-struct foobar_event_data_t {
- unsigned u;
- const char *s;
-};
-
-struct foobar_subscriber_data_t {
- const char *name;
- long l;
-};
-
-static int
-foobar_sub1(foobar_event_data_t *ev, foobar_subscriber_data_t *mine)
-{
- ev->u += 10;
- mine->l += 100;
- return 0;
-}
-
-static int
-foobar_sub2(foobar_event_data_t *ev, foobar_subscriber_data_t *mine)
-{
- ev->u += 5;
- mine->l += 50;
- return 0;
-}
-
-static void
-test_pubsub_basic(void *arg)
-{
- (void)arg;
- foobar_subscriber_data_t subdata1 = { "hi", 0 };
- foobar_subscriber_data_t subdata2 = { "wow", 0 };
- const foobar_subscriber_t *sub1;
- const foobar_subscriber_t *sub2;
- foobar_event_data_t ed = { 0, "x" };
- foobar_event_data_t ed2 = { 0, "y" };
- sub1 = foobar_subscribe(foobar_sub1, &subdata1, SUBSCRIBE_ATSTART, 100);
- tt_assert(sub1);
-
- foobar_notify(&ed, 0);
- tt_int_op(subdata1.l, OP_EQ, 100);
- tt_int_op(subdata2.l, OP_EQ, 0);
- tt_int_op(ed.u, OP_EQ, 10);
-
- sub2 = foobar_subscribe(foobar_sub2, &subdata2, 0, 5);
- tt_assert(sub2);
-
- foobar_notify(&ed2, 0);
- tt_int_op(subdata1.l, OP_EQ, 200);
- tt_int_op(subdata2.l, OP_EQ, 50);
- tt_int_op(ed2.u, OP_EQ, 15);
-
- foobar_unsubscribe(sub1);
-
- foobar_notify(&ed, 0);
- tt_int_op(subdata1.l, OP_EQ, 200);
- tt_int_op(subdata2.l, OP_EQ, 100);
- tt_int_op(ed.u, OP_EQ, 15);
-
- done:
- foobar_clear();
-}
-
-struct testcase_t pubsub_tests[] = {
- { "pubsub_basic", test_pubsub_basic, TT_FORK, NULL, NULL },
- END_OF_TESTCASES
-};
-
diff --git a/src/test/test_relaycell.c b/src/test/test_relaycell.c
index 64b0664292..9f314b7704 100644
--- a/src/test/test_relaycell.c
+++ b/src/test/test_relaycell.c
@@ -9,7 +9,7 @@
#include "or/main.h"
#include "or/config.h"
#include "or/connection.h"
-#include "common/crypto.h"
+#include "lib/crypt_ops/crypto.h"
#include "or/circuitbuild.h"
#include "or/circuitlist.h"
#include "or/connection_edge.h"
diff --git a/src/test/test_relaycrypt.c b/src/test/test_relaycrypt.c
index 0b8541974f..7f0ca06983 100644
--- a/src/test/test_relaycrypt.c
+++ b/src/test/test_relaycrypt.c
@@ -7,7 +7,7 @@
#include "or/circuitbuild.h"
#define CIRCUITLIST_PRIVATE
#include "or/circuitlist.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/relay.h"
#include "or/relay_crypto.h"
diff --git a/src/test/test_router.c b/src/test/test_router.c
index f2f325785f..6e9424a3ad 100644
--- a/src/test/test_router.c
+++ b/src/test/test_router.c
@@ -9,8 +9,8 @@
#include "or/or.h"
#include "or/config.h"
-#include "common/crypto_curve25519.h"
-#include "common/crypto_ed25519.h"
+#include "lib/crypt_ops/crypto_curve25519.h"
+#include "lib/crypt_ops/crypto_ed25519.h"
#include "or/router.h"
#include "or/routerlist.h"
diff --git a/src/test/test_routerkeys.c b/src/test/test_routerkeys.c
index 8cfc9f808f..948cf0d60c 100644
--- a/src/test/test_routerkeys.c
+++ b/src/test/test_routerkeys.c
@@ -10,7 +10,7 @@
#include "or/router.h"
#include "or/routerkeys.h"
#include "common/util.h"
-#include "common/crypto.h"
+#include "lib/crypt_ops/crypto.h"
#include "or/torcert.h"
#include "test/test.h"
diff --git a/src/test/test_routerlist.c b/src/test/test_routerlist.c
index b6032ed87c..e8f8478330 100644
--- a/src/test/test_routerlist.c
+++ b/src/test/test_routerlist.c
@@ -18,7 +18,7 @@
#include "or/connection.h"
#include "common/container.h"
#include "or/control.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/directory.h"
#include "or/dirauth/dirvote.h"
#include "or/entrynodes.h"
diff --git a/src/test/test_shared_random.c b/src/test/test_shared_random.c
index 149129d0c7..55910a351e 100644
--- a/src/test/test_shared_random.c
+++ b/src/test/test_shared_random.c
@@ -9,7 +9,7 @@
#include "or/or.h"
#include "test/test.h"
#include "or/config.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/dirauth/dirvote.h"
#include "or/dirauth/shared_random.h"
#include "or/dirauth/shared_random_state.h"
diff --git a/src/test/test_storagedir.c b/src/test/test_storagedir.c
index 4deb881335..4dd7673521 100644
--- a/src/test/test_storagedir.c
+++ b/src/test/test_storagedir.c
@@ -2,7 +2,7 @@
/* See LICENSE for licensing information */
#include "or/or.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "common/storagedir.h"
#include "test/test.h"
diff --git a/src/test/test_tortls.c b/src/test/test_tortls.c
index 6c63149425..80f95b6c08 100644
--- a/src/test/test_tortls.c
+++ b/src/test/test_tortls.c
@@ -33,7 +33,7 @@ ENABLE_GCC_WARNING(redundant-decls)
#include "or/or.h"
#include "common/torlog.h"
#include "or/config.h"
-#include "common/tortls.h"
+#include "lib/tls/tortls.h"
#include "test/test.h"
#include "test/log_test_helpers.h"
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 4d06e3e7c4..a766f8457f 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -12,12 +12,12 @@
#include "common/buffers.h"
#include "or/config.h"
#include "or/control.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "test/test.h"
#include "common/memarea.h"
#include "common/util_process.h"
#include "test/log_test_helpers.h"
-#include "common/compress_zstd.h"
+#include "lib/compress/compress_zstd.h"
#ifdef HAVE_PWD_H
#include <pwd.h>
diff --git a/src/test/test_util_format.c b/src/test/test_util_format.c
index d56915822f..931a184e7a 100644
--- a/src/test/test_util_format.c
+++ b/src/test/test_util_format.c
@@ -6,7 +6,7 @@
#include "test/test.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#define UTIL_FORMAT_PRIVATE
#include "common/util_format.h"
diff --git a/src/test/test_util_slow.c b/src/test/test_util_slow.c
index 3d725d5025..9e4d7b0a10 100644
--- a/src/test/test_util_slow.c
+++ b/src/test/test_util_slow.c
@@ -7,7 +7,7 @@
#define UTIL_PRIVATE
#include "common/util.h"
#include "common/util_process.h"
-#include "common/crypto.h"
+#include "lib/crypt_ops/crypto.h"
#include "common/torlog.h"
#include "test/test.h"
diff --git a/src/test/test_workqueue.c b/src/test/test_workqueue.c
index 6935d286c8..fe23c5319d 100644
--- a/src/test/test_workqueue.c
+++ b/src/test/test_workqueue.c
@@ -7,8 +7,8 @@
#include "common/compat_threads.h"
#include "or/onion.h"
#include "common/workqueue.h"
-#include "common/crypto_curve25519.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_curve25519.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "common/compat_libevent.h"
#include <stdio.h>
diff --git a/src/test/testing_common.c b/src/test/testing_common.c
index f9e60001da..3baeb98031 100644
--- a/src/test/testing_common.c
+++ b/src/test/testing_common.c
@@ -13,7 +13,7 @@
#include "or/or.h"
#include "or/control.h"
#include "or/config.h"
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "or/rephist.h"
#include "lib/err/backtrace.h"
#include "test/test.h"
diff --git a/src/test/testing_rsakeys.c b/src/test/testing_rsakeys.c
index f45fcb11a4..087a14e649 100644
--- a/src/test/testing_rsakeys.c
+++ b/src/test/testing_rsakeys.c
@@ -3,7 +3,7 @@
* Copyright (c) 2007-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "common/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "orconfig.h"
#include "or/or.h"
#include "test/test.h"