diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-11-17 09:26:50 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-11-17 09:26:50 -0500 |
commit | 70f337fdb20f5ce378e1bfb936aa63a40cdcacaa (patch) | |
tree | 974a7941340830e510beef8b6d713959f3ca7830 /src/test/test.c | |
parent | b91bd27e6f94e76359097e1ec53494ea5168108d (diff) | |
download | tor-70f337fdb20f5ce378e1bfb936aa63a40cdcacaa.tar.gz tor-70f337fdb20f5ce378e1bfb936aa63a40cdcacaa.zip |
Some unit tests now require that periodic events be initialized.
Diffstat (limited to 'src/test/test.c')
-rw-r--r-- | src/test/test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/test.c b/src/test/test.c index 44171b56b8..0bc6292327 100644 --- a/src/test/test.c +++ b/src/test/test.c @@ -28,6 +28,7 @@ #define ROUTER_PRIVATE #define CIRCUITSTATS_PRIVATE #define CIRCUITLIST_PRIVATE +#define MAIN_PRIVATE #define STATEFILE_PRIVATE /* @@ -50,6 +51,7 @@ double fabs(double x); #include "rendcache.h" #include "test.h" #include "torgzip.h" +#include "main.h" #include "memarea.h" #include "onion.h" #include "onion_ntor.h" @@ -317,6 +319,8 @@ test_circuit_timeout(void *arg) int i, runs; double close_ms; (void)arg; + initialize_periodic_events(); + circuit_build_times_init(&initial); circuit_build_times_init(&estimate); circuit_build_times_init(&final); @@ -456,6 +460,7 @@ test_circuit_timeout(void *arg) circuit_build_times_free_timeouts(&estimate); circuit_build_times_free_timeouts(&final); or_state_free(state); + teardown_periodic_events(); } /** Test encoding and parsing of rendezvous service descriptors. */ |