summaryrefslogtreecommitdiff
path: root/src/test/bench.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-11-01 14:13:36 -0400
committerNick Mathewson <nickm@torproject.org>2018-11-05 09:22:02 -0500
commit05b54f6a6a24ebdb47de4f7e41cf94f2f6be93bd (patch)
treeab0b383c73f1ab5fd0106e4e4687f137351559fa /src/test/bench.c
parenta0ee54549fec3ae710ab5e3623d707bd08adcafe (diff)
downloadtor-05b54f6a6a24ebdb47de4f7e41cf94f2f6be93bd.tar.gz
tor-05b54f6a6a24ebdb47de4f7e41cf94f2f6be93bd.zip
Use subsystems manager for subsystems used in tests.
Diffstat (limited to 'src/test/bench.c')
-rw-r--r--src/test/bench.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/bench.c b/src/test/bench.c
index 9da1b46a1b..ff8707d41c 100644
--- a/src/test/bench.c
+++ b/src/test/bench.c
@@ -24,6 +24,7 @@
#include "core/or/circuitlist.h"
#include "app/config/config.h"
+#include "app/main/subsysmgr.h"
#include "lib/crypt_ops/crypto_curve25519.h"
#include "lib/crypt_ops/crypto_dh.h"
#include "core/crypto/onion_ntor.h"
@@ -690,9 +691,10 @@ main(int argc, const char **argv)
char *errmsg;
or_options_t *options;
- tor_threads_init();
+ subsystems_init_upto(SUBSYS_LEVEL_LIBS);
+ flush_log_messages_from_startup();
+
tor_compress_init();
- init_logging(1);
if (argc == 4 && !strcmp(argv[1], "diff")) {
const int N = 200;
@@ -739,7 +741,6 @@ main(int argc, const char **argv)
init_protocol_warning_severity_level();
options = options_new();
- init_logging(1);
options->command = CMD_RUN_UNITTESTS;
options->DataDirectory = tor_strdup("");
options->KeyDirectory = tor_strdup("");