diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test.c | 4 | ||||
-rw-r--r-- | src/test/test_circuitmux.c | 4 | ||||
-rw-r--r-- | src/test/test_dir.c | 2 | ||||
-rw-r--r-- | src/test/test_dns.c | 2 | ||||
-rw-r--r-- | src/test/test_tortls.c | 2 | ||||
-rw-r--r-- | src/test/testing_common.c | 5 |
6 files changed, 7 insertions, 12 deletions
diff --git a/src/test/test.c b/src/test/test.c index f12ae21ff0..d671ac896e 100644 --- a/src/test/test.c +++ b/src/test/test.c @@ -319,11 +319,7 @@ 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); diff --git a/src/test/test_circuitmux.c b/src/test/test_circuitmux.c index 6d93731eea..5c72fc656d 100644 --- a/src/test/test_circuitmux.c +++ b/src/test/test_circuitmux.c @@ -36,11 +36,7 @@ test_cmux_destroy_cell_queue(void *arg) circuit_t *circ = NULL; cell_queue_t *cq = NULL; packed_cell_t *pc = NULL; - tor_libevent_cfg cfg; - memset(&cfg, 0, sizeof(cfg)); - - tor_libevent_initialize(&cfg); scheduler_init(); (void) arg; diff --git a/src/test/test_dir.c b/src/test/test_dir.c index 4824a94132..83a8b8ccc6 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -3312,7 +3312,6 @@ test_dir_download_status_schedule(void *arg) tt_assert(increment == expected_increment); tt_assert(dls_failure.next_attempt_at == TIME_MIN + expected_increment); -#if TIME_T_IS_SIGNED delay1 = INT_MAX; increment = download_status_schedule_get_delay(&dls_failure, schedule, @@ -3320,7 +3319,6 @@ test_dir_download_status_schedule(void *arg) expected_increment = delay1; tt_assert(increment == expected_increment); tt_assert(dls_failure.next_attempt_at == TIME_MAX); -#endif delay1 = 0; increment = download_status_schedule_get_delay(&dls_attempt, diff --git a/src/test/test_dns.c b/src/test/test_dns.c index 6fdbe905e0..5289ca58ff 100644 --- a/src/test/test_dns.c +++ b/src/test/test_dns.c @@ -490,7 +490,7 @@ NS(test_main)(void *arg) (void)arg; - TO_CONN(exitconn)->address = tor_strdup("127.0.0.1.in-addr.arpa"); + TO_CONN(exitconn)->address = tor_strdup("1.0.0.127.in-addr.arpa"); NS_MOCK(router_my_exit_policy_is_reject_star); diff --git a/src/test/test_tortls.c b/src/test/test_tortls.c index 71b3863963..138485c971 100644 --- a/src/test/test_tortls.c +++ b/src/test/test_tortls.c @@ -1612,7 +1612,7 @@ test_tortls_block_renegotiation(void *ignored) tt_assert(!(tls->ssl->s3->flags & SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION)); #endif - + done: tor_free(tls->ssl->s3); tor_free(tls->ssl); diff --git a/src/test/testing_common.c b/src/test/testing_common.c index e20e9e6095..9c7fca05a5 100644 --- a/src/test/testing_common.c +++ b/src/test/testing_common.c @@ -238,6 +238,11 @@ main(int c, const char **v) update_approx_time(time(NULL)); options = options_new(); tor_threads_init(); + + struct tor_libevent_cfg cfg; + memset(&cfg, 0, sizeof(cfg)); + tor_libevent_initialize(&cfg); + control_initialize_event_queue(); init_logging(1); configure_backtrace_handler(get_version()); |