summaryrefslogtreecommitdiff
path: root/src/test/test.c
diff options
context:
space:
mode:
authorcypherpunks <cypherpunks@torproject.org>2015-11-25 15:20:07 +0100
committerNick Mathewson <nickm@torproject.org>2015-11-25 09:38:46 -0500
commitc59c622d8590c4abed6b8095a7451e2ba4d9200a (patch)
treecaf8e096579d44443827a8295a1d5bfbfafeb2c5 /src/test/test.c
parenta09e7cd31a16244793c0848321c25e9cf6d8046f (diff)
downloadtor-c59c622d8590c4abed6b8095a7451e2ba4d9200a.tar.gz
tor-c59c622d8590c4abed6b8095a7451e2ba4d9200a.zip
Initialize libevent before periodic events
The initialization of libevent interferes with other tests so we also fork the circuit_timeout test.
Diffstat (limited to 'src/test/test.c')
-rw-r--r--src/test/test.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/test/test.c b/src/test/test.c
index 0bc6292327..1c4c2921db 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -319,6 +319,11 @@ test_circuit_timeout(void *arg)
int i, runs;
double close_ms;
(void)arg;
+ tor_libevent_cfg cfg;
+
+ memset(&cfg, 0, sizeof(cfg));
+
+ tor_libevent_initialize(&cfg);
initialize_periodic_events();
circuit_build_times_init(&initial);
@@ -1114,7 +1119,7 @@ static struct testcase_t test_array[] = {
{ "bad_onion_handshake", test_bad_onion_handshake, 0, NULL, NULL },
ENT(onion_queues),
{ "ntor_handshake", test_ntor_handshake, 0, NULL, NULL },
- ENT(circuit_timeout),
+ FORK(circuit_timeout),
FORK(rend_fns),
ENT(geoip),
FORK(geoip_with_pt),