]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Initialize libevent before periodic events
authorcypherpunks <cypherpunks@torproject.org>
Wed, 25 Nov 2015 14:20:07 +0000 (15:20 +0100)
committerNick Mathewson <nickm@torproject.org>
Wed, 25 Nov 2015 14:38:46 +0000 (09:38 -0500)
The initialization of libevent interferes with other tests so we also
fork the circuit_timeout test.

src/test/test.c

index 0bc629232724695791542f298f8ec7f520110099..1c4c2921dbe55b5a266c5ba3467020d13f37c426 100644 (file)
@@ -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),