Run rectify_include_paths.py

This commit is contained in:
Nick Mathewson
2018-06-20 09:35:05 -04:00
parent 257b280776
commit 0dab29ce10
410 changed files with 3487 additions and 3488 deletions
+11 -11
View File
@@ -10,24 +10,24 @@
#include "orconfig.h"
#include "or.h"
#include "onion_tap.h"
#include "relay_crypto.h"
#include "or/or.h"
#include "or/onion_tap.h"
#include "or/relay_crypto.h"
#include <openssl/opensslv.h>
#include <openssl/evp.h>
#include <openssl/ec.h>
#include <openssl/ecdh.h>
#include <openssl/obj_mac.h>
#include "config.h"
#include "crypto_curve25519.h"
#include "onion_ntor.h"
#include "crypto_ed25519.h"
#include "crypto_rand.h"
#include "consdiff.h"
#include "or/config.h"
#include "common/crypto_curve25519.h"
#include "or/onion_ntor.h"
#include "common/crypto_ed25519.h"
#include "common/crypto_rand.h"
#include "or/consdiff.h"
#include "cell_st.h"
#include "or_circuit_st.h"
#include "or/cell_st.h"
#include "or/or_circuit_st.h"
#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_PROCESS_CPUTIME_ID)
static uint64_t nanostart;
+4 -4
View File
@@ -1,10 +1,10 @@
/* Copyright (c) 2016-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define ROUTERPARSE_PRIVATE
#include "or.h"
#include "routerparse.h"
#include "networkstatus.h"
#include "fuzzing.h"
#include "or/or.h"
#include "or/routerparse.h"
#include "or/networkstatus.h"
#include "test/fuzz/fuzzing.h"
static void
mock_dump_desc__nodump(const char *desc, const char *type)
+5 -5
View File
@@ -1,11 +1,11 @@
/* Copyright (c) 2016-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define ROUTERPARSE_PRIVATE
#include "or.h"
#include "routerparse.h"
#include "routerlist.h"
#include "routerkeys.h"
#include "fuzzing.h"
#include "or/or.h"
#include "or/routerparse.h"
#include "or/routerlist.h"
#include "or/routerkeys.h"
#include "test/fuzz/fuzzing.h"
static int
mock_check_tap_onion_key_crosscert__nocheck(const uint8_t *crosscert,
+3 -3
View File
@@ -4,10 +4,10 @@
#define CONSDIFF_PRIVATE
#include "orconfig.h"
#include "or.h"
#include "consdiff.h"
#include "or/or.h"
#include "or/consdiff.h"
#include "fuzzing.h"
#include "test/fuzz/fuzzing.h"
static int
mock_consensus_compute_digest_(const char *c, consensus_digest_t *d)
+3 -3
View File
@@ -4,10 +4,10 @@
#define CONSDIFF_PRIVATE
#include "orconfig.h"
#include "or.h"
#include "consdiff.h"
#include "or/or.h"
#include "or/consdiff.h"
#include "fuzzing.h"
#include "test/fuzz/fuzzing.h"
static int
mock_consensus_compute_digest_(const char *c, consensus_digest_t *d)
+5 -5
View File
@@ -1,11 +1,11 @@
/* Copyright (c) 2016-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define ROUTERPARSE_PRIVATE
#include "or.h"
#include "routerparse.h"
#include "routerlist.h"
#include "routerkeys.h"
#include "fuzzing.h"
#include "or/or.h"
#include "or/routerparse.h"
#include "or/routerlist.h"
#include "or/routerkeys.h"
#include "test/fuzz/fuzzing.h"
static void
mock_dump_desc__nodump(const char *desc, const char *type)
+4 -4
View File
@@ -1,10 +1,10 @@
/* Copyright (c) 2016-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define ROUTERPARSE_PRIVATE
#include "or.h"
#include "routerparse.h"
#include "rendcommon.h"
#include "fuzzing.h"
#include "or/or.h"
#include "or/routerparse.h"
#include "or/rendcommon.h"
#include "test/fuzz/fuzzing.h"
static void
mock_dump_desc__nodump(const char *desc, const char *type)
+7 -7
View File
@@ -4,14 +4,14 @@
#define ROUTERPARSE_PRIVATE
#define HS_DESCRIPTOR_PRIVATE
#include "or.h"
#include "ed25519_cert.h" /* Trunnel interface. */
#include "crypto_ed25519.h"
#include "hs_descriptor.h"
#include "routerparse.h"
#include "util.h"
#include "or/or.h"
#include "trunnel/ed25519_cert.h" /* Trunnel interface. */
#include "common/crypto_ed25519.h"
#include "or/hs_descriptor.h"
#include "or/routerparse.h"
#include "common/util.h"
#include "fuzzing.h"
#include "test/fuzz/fuzzing.h"
static void
mock_dump_desc__nodump(const char *desc, const char *type)
+9 -9
View File
@@ -6,17 +6,17 @@
#define BUFFERS_PRIVATE
#define DIRECTORY_PRIVATE
#include "or.h"
#include "backtrace.h"
#include "buffers.h"
#include "config.h"
#include "connection.h"
#include "directory.h"
#include "torlog.h"
#include "or/or.h"
#include "common/backtrace.h"
#include "common/buffers.h"
#include "or/config.h"
#include "or/connection.h"
#include "or/directory.h"
#include "common/torlog.h"
#include "dir_connection_st.h"
#include "or/dir_connection_st.h"
#include "fuzzing.h"
#include "test/fuzz/fuzzing.h"
static void
mock_connection_write_to_buf_impl_(const char *string, size_t len,
+11 -11
View File
@@ -6,19 +6,19 @@
#define BUFFERS_PRIVATE
#define CONNECTION_EDGE_PRIVATE
#include "or.h"
#include "backtrace.h"
#include "buffers.h"
#include "config.h"
#include "connection.h"
#include "connection_edge.h"
#include "proto_socks.h"
#include "torlog.h"
#include "or/or.h"
#include "common/backtrace.h"
#include "common/buffers.h"
#include "or/config.h"
#include "or/connection.h"
#include "or/connection_edge.h"
#include "or/proto_socks.h"
#include "common/torlog.h"
#include "entry_connection_st.h"
#include "socks_request_st.h"
#include "or/entry_connection_st.h"
#include "or/socks_request_st.h"
#include "fuzzing.h"
#include "test/fuzz/fuzzing.h"
static void
mock_connection_write_to_buf_impl_(const char *string, size_t len,
+5 -5
View File
@@ -1,13 +1,13 @@
/* Copyright (c) 2016-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define ROUTERPARSE_PRIVATE
#include "or.h"
#include "routerparse.h"
#include "rendcommon.h"
#include "or/or.h"
#include "or/routerparse.h"
#include "or/rendcommon.h"
#include "rend_service_descriptor_st.h"
#include "or/rend_service_descriptor_st.h"
#include "fuzzing.h"
#include "test/fuzz/fuzzing.h"
static void
mock_dump_desc__nodump(const char *desc, const char *type)
+4 -4
View File
@@ -1,10 +1,10 @@
/* Copyright (c) 2016-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define ROUTERPARSE_PRIVATE
#include "or.h"
#include "routerparse.h"
#include "microdesc.h"
#include "fuzzing.h"
#include "or/or.h"
#include "or/routerparse.h"
#include "or/microdesc.h"
#include "test/fuzz/fuzzing.h"
static void
mock_dump_desc__nodump(const char *desc, const char *type)
+8 -8
View File
@@ -2,16 +2,16 @@
/* See LICENSE for licensing information */
#define ROUTERPARSE_PRIVATE
#define NETWORKSTATUS_PRIVATE
#include "or.h"
#include "routerparse.h"
#include "memarea.h"
#include "microdesc.h"
#include "networkstatus.h"
#include "or/or.h"
#include "or/routerparse.h"
#include "common/memarea.h"
#include "or/microdesc.h"
#include "or/networkstatus.h"
#include "networkstatus_st.h"
#include "vote_routerstatus_st.h"
#include "or/networkstatus_st.h"
#include "or/vote_routerstatus_st.h"
#include "fuzzing.h"
#include "test/fuzz/fuzzing.h"
static void
mock_dump_desc__nodump(const char *desc, const char *type)
+6 -6
View File
@@ -2,12 +2,12 @@
/* See LICENSE for licensing information */
#define CRYPTO_ED25519_PRIVATE
#include "orconfig.h"
#include "or.h"
#include "backtrace.h"
#include "config.h"
#include "fuzzing.h"
#include "crypto.h"
#include "crypto_ed25519.h"
#include "or/or.h"
#include "common/backtrace.h"
#include "or/config.h"
#include "test/fuzz/fuzzing.h"
#include "common/crypto.h"
#include "common/crypto_ed25519.h"
static or_options_t *mock_options = NULL;
static const or_options_t *
+6 -6
View File
@@ -1,13 +1,13 @@
/* Copyright (c) 2017-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#include "or.h"
#include "crypto_ed25519.h"
#include "test.h"
#include "torcert.h"
#include "or/or.h"
#include "common/crypto_ed25519.h"
#include "test/test.h"
#include "or/torcert.h"
#include "hs_common.h"
#include "hs_test_helpers.h"
#include "or/hs_common.h"
#include "test/hs_test_helpers.h"
hs_desc_intro_point_t *
hs_helper_build_intro_point(const ed25519_keypair_t *signing_kp, time_t now,
+2 -2
View File
@@ -4,8 +4,8 @@
#ifndef TOR_HS_TEST_HELPERS_H
#define TOR_HS_TEST_HELPERS_H
#include "ed25519_cert.h"
#include "hs_descriptor.h"
#include "trunnel/ed25519_cert.h"
#include "or/hs_descriptor.h"
/* Set of functions to help build and test descriptors. */
hs_desc_intro_point_t *hs_helper_build_intro_point(
+2 -2
View File
@@ -1,8 +1,8 @@
/* Copyright (c) 2015-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define LOG_PRIVATE
#include "torlog.h"
#include "log_test_helpers.h"
#include "common/torlog.h"
#include "test/log_test_helpers.h"
/**
* \file log_test_helpers.c
+1 -1
View File
@@ -1,7 +1,7 @@
/* Copyright (c) 2014-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#include "or.h"
#include "or/or.h"
#ifndef TOR_LOG_TEST_HELPERS_H
#define TOR_LOG_TEST_HELPERS_H
+8 -8
View File
@@ -1,15 +1,15 @@
/* Copyright (c) 2014-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#include "or.h"
#include "crypto_rand.h"
#include "test.h"
#include "rendcommon.h"
#include "rend_test_helpers.h"
#include "or/or.h"
#include "common/crypto_rand.h"
#include "test/test.h"
#include "or/rendcommon.h"
#include "test/rend_test_helpers.h"
#include "extend_info_st.h"
#include "rend_intro_point_st.h"
#include "rend_service_descriptor_st.h"
#include "or/extend_info_st.h"
#include "or/rend_intro_point_st.h"
#include "or/rend_service_descriptor_st.h"
void
generate_desc(int time_diff, rend_encoded_v2_service_descriptor_t **desc,
+1 -1
View File
@@ -1,7 +1,7 @@
/* Copyright (c) 2014-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#include "or.h"
#include "or/or.h"
#ifndef TOR_REND_TEST_HELPERS_H
#define TOR_REND_TEST_HELPERS_H
+3 -3
View File
@@ -7,9 +7,9 @@
#include <sys/types.h>
#include <stdlib.h>
#include "crypto_util.h"
#include "compat.h"
#include "util.h"
#include "common/crypto_util.h"
#include "common/compat.h"
#include "common/util.h"
static unsigned fill_a_buffer_memset(void) __attribute__((noinline));
static unsigned fill_a_buffer_memwipe(void) __attribute__((noinline));
+5 -5
View File
@@ -7,11 +7,11 @@
#include <stdio.h>
#include <string.h>
#include "compat.h"
#include "compat_libevent.h"
#include "crypto_rand.h"
#include "timers.h"
#include "util.h"
#include "common/compat.h"
#include "common/compat_libevent.h"
#include "common/crypto_rand.h"
#include "common/timers.h"
#include "common/util.h"
#define N_TIMERS 1000
#define MAX_DURATION 30
+28 -28
View File
@@ -9,7 +9,7 @@
**/
#include "orconfig.h"
#include "crypto_rand.h"
#include "common/crypto_rand.h"
#include <stdio.h>
#ifdef HAVE_FCNTL_H
@@ -39,34 +39,34 @@
long int lround(double x);
double fabs(double x);
#include "or.h"
#include "backtrace.h"
#include "buffers.h"
#include "circuitlist.h"
#include "circuitstats.h"
#include "compress.h"
#include "config.h"
#include "connection_edge.h"
#include "rendcommon.h"
#include "rendcache.h"
#include "test.h"
#include "main.h"
#include "memarea.h"
#include "onion.h"
#include "onion_ntor.h"
#include "onion_fast.h"
#include "onion_tap.h"
#include "policies.h"
#include "rephist.h"
#include "routerparse.h"
#include "statefile.h"
#include "crypto_curve25519.h"
#include "or/or.h"
#include "common/backtrace.h"
#include "common/buffers.h"
#include "or/circuitlist.h"
#include "or/circuitstats.h"
#include "common/compress.h"
#include "or/config.h"
#include "or/connection_edge.h"
#include "or/rendcommon.h"
#include "or/rendcache.h"
#include "test/test.h"
#include "or/main.h"
#include "common/memarea.h"
#include "or/onion.h"
#include "or/onion_ntor.h"
#include "or/onion_fast.h"
#include "or/onion_tap.h"
#include "or/policies.h"
#include "or/rephist.h"
#include "or/routerparse.h"
#include "or/statefile.h"
#include "common/crypto_curve25519.h"
#include "extend_info_st.h"
#include "or_circuit_st.h"
#include "rend_encoded_v2_service_descriptor_st.h"
#include "rend_intro_point_st.h"
#include "rend_service_descriptor_st.h"
#include "or/extend_info_st.h"
#include "or/or_circuit_st.h"
#include "or/rend_encoded_v2_service_descriptor_st.h"
#include "or/rend_intro_point_st.h"
#include "or/rend_service_descriptor_st.h"
/** Run unit tests for the onion handshake code. */
static void
+1 -1
View File
@@ -13,7 +13,7 @@
#define DEBUG_SMARTLIST 1
#include "compat.h"
#include "common/compat.h"
#include "tinytest.h"
#define TT_EXIT_TEST_FUNCTION STMT_BEGIN goto done; STMT_END
#include "tinytest_macros.h"
+5 -5
View File
@@ -1,13 +1,13 @@
/* Copyright (c) 2014-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#include "or.h"
#include "test.h"
#include "or/or.h"
#include "test/test.h"
#define HIBERNATE_PRIVATE
#include "hibernate.h"
#include "config.h"
#include "or/hibernate.h"
#include "or/config.h"
#define STATEFILE_PRIVATE
#include "statefile.h"
#include "or/statefile.h"
#define NS_MODULE accounting
+5 -5
View File
@@ -5,11 +5,11 @@
#define ADDRESSMAP_PRIVATE
#include "orconfig.h"
#include "or.h"
#include "crypto_rand.h"
#include "test.h"
#include "addressmap.h"
#include "log_test_helpers.h"
#include "or/or.h"
#include "common/crypto_rand.h"
#include "test/test.h"
#include "or/addressmap.h"
#include "test/log_test_helpers.h"
/** Mocking replacement: only handles localhost. */
static int
+4 -4
View File
@@ -23,10 +23,10 @@
#include <net/if.h>
#endif /* defined(HAVE_IFCONF_TO_SMARTLIST) */
#include "or.h"
#include "address.h"
#include "test.h"
#include "log_test_helpers.h"
#include "or/or.h"
#include "common/address.h"
#include "test/test.h"
#include "test/log_test_helpers.h"
/** Return 1 iff <b>sockaddr1</b> and <b>sockaddr2</b> represent
* the same IP address and port combination. Otherwise, return 0.
+13 -13
View File
@@ -1,21 +1,21 @@
/* Copyright (c) 2017-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#include "or.h"
#include "crypto_rand.h"
#include "address_set.h"
#include "microdesc.h"
#include "networkstatus.h"
#include "nodelist.h"
#include "routerlist.h"
#include "torcert.h"
#include "or/or.h"
#include "common/crypto_rand.h"
#include "common/address_set.h"
#include "or/microdesc.h"
#include "or/networkstatus.h"
#include "or/nodelist.h"
#include "or/routerlist.h"
#include "or/torcert.h"
#include "microdesc_st.h"
#include "networkstatus_st.h"
#include "routerinfo_st.h"
#include "routerstatus_st.h"
#include "or/microdesc_st.h"
#include "or/networkstatus_st.h"
#include "or/routerinfo_st.h"
#include "or/routerstatus_st.h"
#include "test.h"
#include "test/test.h"
static networkstatus_t *dummy_ns = NULL;
static networkstatus_t *
+8 -8
View File
@@ -11,16 +11,16 @@
#include <stdbool.h>
#include "or.h"
#include "address.h"
#include "bridges.h"
#include "config.h"
#include "container.h"
#include "transports.h"
#include "util.h"
#include "or/or.h"
#include "common/address.h"
#include "or/bridges.h"
#include "or/config.h"
#include "common/container.h"
#include "or/transports.h"
#include "common/util.h"
/* Test suite stuff */
#include "test.h"
#include "test/test.h"
/**
* A mocked transport_t, constructed via mock_transport_get_by_name().
+4 -4
View File
@@ -7,10 +7,10 @@
/* To prevent 'assert' from going away. */
#undef TOR_COVERAGE
#include "or.h"
#include "util.h"
#include "backtrace.h"
#include "torlog.h"
#include "or/or.h"
#include "common/util.h"
#include "common/backtrace.h"
#include "common/torlog.h"
/* -1: no crash.
* 0: crash with a segmentation fault.
+7 -7
View File
@@ -5,13 +5,13 @@
#define BUFFERS_PRIVATE
#define PROTO_HTTP_PRIVATE
#include "or.h"
#include "buffers.h"
#include "buffers_tls.h"
#include "crypto_rand.h"
#include "proto_http.h"
#include "proto_socks.h"
#include "test.h"
#include "or/or.h"
#include "common/buffers.h"
#include "common/buffers_tls.h"
#include "common/crypto_rand.h"
#include "or/proto_http.h"
#include "or/proto_socks.h"
#include "test/test.h"
/** Run unit tests for buffers.c */
static void
+3 -3
View File
@@ -8,10 +8,10 @@
#define TOKEN_BUCKET_PRIVATE
#include "or.h"
#include "test.h"
#include "or/or.h"
#include "test/test.h"
#include "token_bucket.h"
#include "common/token_bucket.h"
// an imaginary time, in timestamp units. Chosen so it will roll over.
static const uint32_t START_TS = UINT32_MAX-10;
+15 -15
View File
@@ -7,23 +7,23 @@
#define CONNECTION_EDGE_PRIVATE
#define RELAY_PRIVATE
#include "or.h"
#include "channel.h"
#include "connection_edge.h"
#include "connection_or.h"
#include "config.h"
#include "crypto_rand.h"
#include "onion.h"
#include "onion_tap.h"
#include "onion_fast.h"
#include "onion_ntor.h"
#include "relay.h"
#include "or/or.h"
#include "or/channel.h"
#include "or/connection_edge.h"
#include "or/connection_or.h"
#include "or/config.h"
#include "common/crypto_rand.h"
#include "or/onion.h"
#include "or/onion_tap.h"
#include "or/onion_fast.h"
#include "or/onion_ntor.h"
#include "or/relay.h"
#include "cell_st.h"
#include "cell_queue_st.h"
#include "var_cell_st.h"
#include "or/cell_st.h"
#include "or/cell_queue_st.h"
#include "or/var_cell_st.h"
#include "test.h"
#include "test/test.h"
#include <stdlib.h>
#include <string.h>
+8 -8
View File
@@ -3,15 +3,15 @@
#define CIRCUITLIST_PRIVATE
#define RELAY_PRIVATE
#include "or.h"
#include "circuitlist.h"
#include "relay.h"
#include "test.h"
#include "or/or.h"
#include "or/circuitlist.h"
#include "or/relay.h"
#include "test/test.h"
#include "cell_st.h"
#include "cell_queue_st.h"
#include "or_circuit_st.h"
#include "origin_circuit_st.h"
#include "or/cell_st.h"
#include "or/cell_queue_st.h"
#include "or/or_circuit_st.h"
#include "or/origin_circuit_st.h"
static void
test_cq_manip(void *arg)
+18 -18
View File
@@ -3,33 +3,33 @@
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_PRIVATE_
#include "or.h"
#include "channel.h"
#include "or/or.h"
#include "or/channel.h"
/* For channel_note_destroy_not_pending */
#define CIRCUITLIST_PRIVATE
#include "circuitlist.h"
#include "circuitmux.h"
#include "circuitmux_ewma.h"
#include "or/circuitlist.h"
#include "or/circuitmux.h"
#include "or/circuitmux_ewma.h"
/* For var_cell_free */
#include "connection_or.h"
#include "crypto_rand.h"
#include "or/connection_or.h"
#include "common/crypto_rand.h"
/* For packed_cell stuff */
#define RELAY_PRIVATE
#include "relay.h"
#include "or/relay.h"
/* For init/free stuff */
#include "scheduler.h"
#include "networkstatus.h"
#include "or/scheduler.h"
#include "or/networkstatus.h"
#include "cell_st.h"
#include "networkstatus_st.h"
#include "origin_circuit_st.h"
#include "routerstatus_st.h"
#include "var_cell_st.h"
#include "or/cell_st.h"
#include "or/networkstatus_st.h"
#include "or/origin_circuit_st.h"
#include "or/routerstatus_st.h"
#include "or/var_cell_st.h"
/* Test suite stuff */
#include "log_test_helpers.h"
#include "test.h"
#include "fakechans.h"
#include "test/log_test_helpers.h"
#include "test/test.h"
#include "test/fakechans.h"
static int test_chan_accept_cells = 0;
static int test_chan_fixed_cells_recved = 0;
+18 -18
View File
@@ -5,25 +5,25 @@
#define MAIN_PRIVATE
#define NETWORKSTATUS_PRIVATE
#define TOR_TIMERS_PRIVATE
#include "or.h"
#include "test.h"
#include "testsupport.h"
#include "connection.h"
#include "connection_or.h"
#include "channel.h"
#include "channeltls.h"
#include "channelpadding.h"
#include "compat_libevent.h"
#include "config.h"
#include "compat_time.h"
#include "main.h"
#include "networkstatus.h"
#include "log_test_helpers.h"
#include "or/or.h"
#include "test/test.h"
#include "common/testsupport.h"
#include "or/connection.h"
#include "or/connection_or.h"
#include "or/channel.h"
#include "or/channeltls.h"
#include "or/channelpadding.h"
#include "common/compat_libevent.h"
#include "or/config.h"
#include "common/compat_time.h"
#include "or/main.h"
#include "or/networkstatus.h"
#include "test/log_test_helpers.h"
#include "cell_st.h"
#include "networkstatus_st.h"
#include "or_connection_st.h"
#include "routerstatus_st.h"
#include "or/cell_st.h"
#include "or/networkstatus_st.h"
#include "or/or_connection_st.h"
#include "or/routerstatus_st.h"
int channelpadding_get_netflow_inactive_timeout_ms(channel_t *chan);
int64_t channelpadding_compute_time_until_pad_for_netflow(channel_t *chan);
+12 -12
View File
@@ -6,22 +6,22 @@
#include <math.h>
#define TOR_CHANNEL_INTERNAL_
#include "or.h"
#include "address.h"
#include "buffers.h"
#include "channel.h"
#include "channeltls.h"
#include "connection_or.h"
#include "config.h"
#include "or/or.h"
#include "common/address.h"
#include "common/buffers.h"
#include "or/channel.h"
#include "or/channeltls.h"
#include "or/connection_or.h"
#include "or/config.h"
/* For init/free stuff */
#include "scheduler.h"
#include "tortls.h"
#include "or/scheduler.h"
#include "common/tortls.h"
#include "or_connection_st.h"
#include "or/or_connection_st.h"
/* Test suite stuff */
#include "test.h"
#include "fakechans.h"
#include "test/test.h"
#include "test/fakechans.h"
/* The channeltls unit tests */
static void test_channeltls_create(void *arg);
+4 -4
View File
@@ -2,7 +2,7 @@
/* See LICENSE for licensing information */
#include "orconfig.h"
#include "or.h"
#include "or/or.h"
#ifdef _WIN32
#include <direct.h>
@@ -10,9 +10,9 @@
#include <dirent.h>
#endif
#include "config.h"
#include "test.h"
#include "util.h"
#include "or/config.h"
#include "test/test.h"
#include "common/util.h"
#ifdef _WIN32
#define mkdir(a,b) mkdir(a)
+7 -7
View File
@@ -5,14 +5,14 @@
#define CIRCUITBUILD_PRIVATE
#include "or.h"
#include "test.h"
#include "test_helpers.h"
#include "log_test_helpers.h"
#include "config.h"
#include "circuitbuild.h"
#include "or/or.h"
#include "test/test.h"
#include "test/test_helpers.h"
#include "test/log_test_helpers.h"
#include "or/config.h"
#include "or/circuitbuild.h"
#include "extend_info_st.h"
#include "or/extend_info_st.h"
/* Dummy nodes smartlist for testing */
static smartlist_t dummy_nodes;
+10 -10
View File
@@ -5,17 +5,17 @@
#define CIRCUITBUILD_PRIVATE
#define CIRCUITLIST_PRIVATE
#define HS_CIRCUITMAP_PRIVATE
#include "or.h"
#include "channel.h"
#include "circuitbuild.h"
#include "circuitlist.h"
#include "circuitmux_ewma.h"
#include "hs_circuitmap.h"
#include "test.h"
#include "log_test_helpers.h"
#include "or/or.h"
#include "or/channel.h"
#include "or/circuitbuild.h"
#include "or/circuitlist.h"
#include "or/circuitmux_ewma.h"
#include "or/hs_circuitmap.h"
#include "test/test.h"
#include "test/log_test_helpers.h"
#include "or_circuit_st.h"
#include "origin_circuit_st.h"
#include "or/or_circuit_st.h"
#include "or/origin_circuit_st.h"
static channel_t *
new_fake_channel(void)
+8 -8
View File
@@ -5,15 +5,15 @@
#define CIRCUITMUX_PRIVATE
#define CIRCUITMUX_EWMA_PRIVATE
#define RELAY_PRIVATE
#include "or.h"
#include "channel.h"
#include "circuitmux.h"
#include "circuitmux_ewma.h"
#include "relay.h"
#include "scheduler.h"
#include "test.h"
#include "or/or.h"
#include "or/channel.h"
#include "or/circuitmux.h"
#include "or/circuitmux_ewma.h"
#include "or/relay.h"
#include "or/scheduler.h"
#include "test/test.h"
#include "destroy_cell_queue_st.h"
#include "or/destroy_cell_queue_st.h"
/* XXXX duplicated function from test_circuitlist.c */
static channel_t *
+14 -14
View File
@@ -6,21 +6,21 @@
#define CIRCUITLIST_PRIVATE
#define CHANNEL_PRIVATE_
#include "or.h"
#include "test.h"
#include "test_helpers.h"
#include "log_test_helpers.h"
#include "config.h"
#include "circuitlist.h"
#include "circuitbuild.h"
#include "circuitstats.h"
#include "circuituse.h"
#include "channel.h"
#include "or/or.h"
#include "test/test.h"
#include "test/test_helpers.h"
#include "test/log_test_helpers.h"
#include "or/config.h"
#include "or/circuitlist.h"
#include "or/circuitbuild.h"
#include "or/circuitstats.h"
#include "or/circuituse.h"
#include "or/channel.h"
#include "cpath_build_state_st.h"
#include "crypt_path_st.h"
#include "extend_info_st.h"
#include "origin_circuit_st.h"
#include "or/cpath_build_state_st.h"
#include "or/crypt_path_st.h"
#include "or/extend_info_st.h"
#include "or/origin_circuit_st.h"
void test_circuitstats_timeout(void *arg);
void test_circuitstats_hoplen(void *arg);
+10 -10
View File
@@ -5,17 +5,17 @@
#define CIRCUITLIST_PRIVATE
#include "or.h"
#include "test.h"
#include "test_helpers.h"
#include "config.h"
#include "circuitlist.h"
#include "circuituse.h"
#include "circuitbuild.h"
#include "nodelist.h"
#include "or/or.h"
#include "test/test.h"
#include "test/test_helpers.h"
#include "or/config.h"
#include "or/circuitlist.h"
#include "or/circuituse.h"
#include "or/circuitbuild.h"
#include "or/nodelist.h"
#include "cpath_build_state_st.h"
#include "origin_circuit_st.h"
#include "or/cpath_build_state_st.h"
#include "or/origin_circuit_st.h"
static void
test_circuit_is_available_for_use_ret_false_when_marked_for_close(void *arg)
+4 -4
View File
@@ -3,15 +3,15 @@
#define COMPAT_LIBEVENT_PRIVATE
#include "orconfig.h"
#include "or.h"
#include "or/or.h"
#include "test.h"
#include "test/test.h"
#include "compat_libevent.h"
#include "common/compat_libevent.h"
#include <event2/event.h>
#include "log_test_helpers.h"
#include "test/log_test_helpers.h"
#define NS_MODULE compat_libevent
+37 -37
View File
@@ -8,45 +8,45 @@
#define CONFIG_PRIVATE
#define PT_PRIVATE
#define ROUTERSET_PRIVATE
#include "or.h"
#include "address.h"
#include "addressmap.h"
#include "bridges.h"
#include "circuitmux_ewma.h"
#include "circuitbuild.h"
#include "config.h"
#include "confparse.h"
#include "connection.h"
#include "connection_edge.h"
#include "test.h"
#include "util.h"
#include "connection_or.h"
#include "control.h"
#include "cpuworker.h"
#include "dirserv.h"
#include "dirauth/dirvote.h"
#include "dns.h"
#include "entrynodes.h"
#include "transports.h"
#include "ext_orport.h"
#include "geoip.h"
#include "hibernate.h"
#include "main.h"
#include "networkstatus.h"
#include "nodelist.h"
#include "policies.h"
#include "rendclient.h"
#include "rendservice.h"
#include "router.h"
#include "routerlist.h"
#include "routerset.h"
#include "statefile.h"
#include "or/or.h"
#include "common/address.h"
#include "or/addressmap.h"
#include "or/bridges.h"
#include "or/circuitmux_ewma.h"
#include "or/circuitbuild.h"
#include "or/config.h"
#include "or/confparse.h"
#include "or/connection.h"
#include "or/connection_edge.h"
#include "test/test.h"
#include "common/util.h"
#include "or/connection_or.h"
#include "or/control.h"
#include "or/cpuworker.h"
#include "or/dirserv.h"
#include "or/dirauth/dirvote.h"
#include "or/dns.h"
#include "or/entrynodes.h"
#include "or/transports.h"
#include "or/ext_orport.h"
#include "or/geoip.h"
#include "or/hibernate.h"
#include "or/main.h"
#include "or/networkstatus.h"
#include "or/nodelist.h"
#include "or/policies.h"
#include "or/rendclient.h"
#include "or/rendservice.h"
#include "or/router.h"
#include "or/routerlist.h"
#include "or/routerset.h"
#include "or/statefile.h"
#include "test_helpers.h"
#include "test/test_helpers.h"
#include "dir_server_st.h"
#include "port_cfg_st.h"
#include "routerinfo_st.h"
#include "or/dir_server_st.h"
#include "or/port_cfg_st.h"
#include "or/routerinfo_st.h"
static void
test_config_addressmap(void *arg)
+20 -20
View File
@@ -7,29 +7,29 @@
#define MAIN_PRIVATE
#define CONNECTION_OR_PRIVATE
#include "or.h"
#include "test.h"
#include "or/or.h"
#include "test/test.h"
#include "connection.h"
#include "connection_edge.h"
#include "hs_common.h"
#include "main.h"
#include "microdesc.h"
#include "nodelist.h"
#include "networkstatus.h"
#include "rendcache.h"
#include "directory.h"
#include "connection_or.h"
#include "or/connection.h"
#include "or/connection_edge.h"
#include "or/hs_common.h"
#include "or/main.h"
#include "or/microdesc.h"
#include "or/nodelist.h"
#include "or/networkstatus.h"
#include "or/rendcache.h"
#include "or/directory.h"
#include "or/connection_or.h"
#include "test_connection.h"
#include "test_helpers.h"
#include "test/test_connection.h"
#include "test/test_helpers.h"
#include "dir_connection_st.h"
#include "entry_connection_st.h"
#include "node_st.h"
#include "or_connection_st.h"
#include "routerinfo_st.h"
#include "socks_request_st.h"
#include "or/dir_connection_st.h"
#include "or/entry_connection_st.h"
#include "or/node_st.h"
#include "or/or_connection_st.h"
#include "or/routerinfo_st.h"
#include "or/socks_request_st.h"
static void * test_conn_get_basic_setup(const struct testcase_t *tc);
static int test_conn_get_basic_teardown(const struct testcase_t *tc,
+4 -4
View File
@@ -1,10 +1,10 @@
/* Copyright (c) 2017-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#include "or.h"
#include "config.h"
#include "conscache.h"
#include "test.h"
#include "or/or.h"
#include "or/config.h"
#include "or/conscache.h"
#include "test/test.h"
#ifdef HAVE_UTIME_H
#include <utime.h>
+5 -5
View File
@@ -4,12 +4,12 @@
#define CONSDIFF_PRIVATE
#include "or.h"
#include "test.h"
#include "or/or.h"
#include "test/test.h"
#include "consdiff.h"
#include "memarea.h"
#include "log_test_helpers.h"
#include "or/consdiff.h"
#include "common/memarea.h"
#include "test/log_test_helpers.h"
#define tt_str_eq_line(a,b) \
tt_assert(line_str_eq((b),(a)))
+13 -13
View File
@@ -3,21 +3,21 @@
#define CONSDIFFMGR_PRIVATE
#include "or.h"
#include "config.h"
#include "conscache.h"
#include "consdiff.h"
#include "consdiffmgr.h"
#include "cpuworker.h"
#include "crypto_rand.h"
#include "networkstatus.h"
#include "routerparse.h"
#include "workqueue.h"
#include "or/or.h"
#include "or/config.h"
#include "or/conscache.h"
#include "or/consdiff.h"
#include "or/consdiffmgr.h"
#include "or/cpuworker.h"
#include "common/crypto_rand.h"
#include "or/networkstatus.h"
#include "or/routerparse.h"
#include "common/workqueue.h"
#include "networkstatus_st.h"
#include "or/networkstatus_st.h"
#include "test.h"
#include "log_test_helpers.h"
#include "test/test.h"
#include "test/log_test_helpers.h"
// ============================== Setup/teardown the consdiffmgr
// These functions get run before/after each test in this module
+4 -4
View File
@@ -4,10 +4,10 @@
/* See LICENSE for licensing information */
#include "orconfig.h"
#include "or.h"
#include "crypto_rand.h"
#include "fp_pair.h"
#include "test.h"
#include "or/or.h"
#include "common/crypto_rand.h"
#include "or/fp_pair.h"
#include "test/test.h"
/** Helper: return a tristate based on comparing the strings in *<b>a</b> and
* *<b>b</b>. */
+15 -15
View File
@@ -2,22 +2,22 @@
/* See LICENSE for licensing information */
#define CONTROL_PRIVATE
#include "or.h"
#include "bridges.h"
#include "control.h"
#include "entrynodes.h"
#include "hs_common.h"
#include "networkstatus.h"
#include "rendservice.h"
#include "routerlist.h"
#include "nodelist.h"
#include "test.h"
#include "test_helpers.h"
#include "or/or.h"
#include "or/bridges.h"
#include "or/control.h"
#include "or/entrynodes.h"
#include "or/hs_common.h"
#include "or/networkstatus.h"
#include "or/rendservice.h"
#include "or/routerlist.h"
#include "or/nodelist.h"
#include "test/test.h"
#include "test/test_helpers.h"
#include "control_connection_st.h"
#include "download_status_st.h"
#include "microdesc_st.h"
#include "node_st.h"
#include "or/control_connection_st.h"
#include "or/download_status_st.h"
#include "or/microdesc_st.h"
#include "or/node_st.h"
static void
test_add_onion_helper_keyarg_v3(void *arg)
+8 -8
View File
@@ -4,15 +4,15 @@
#define CONNECTION_PRIVATE
#define TOR_CHANNEL_INTERNAL_
#define CONTROL_PRIVATE
#include "or.h"
#include "channel.h"
#include "channeltls.h"
#include "connection.h"
#include "control.h"
#include "test.h"
#include "or/or.h"
#include "or/channel.h"
#include "or/channeltls.h"
#include "or/connection.h"
#include "or/control.h"
#include "test/test.h"
#include "or_circuit_st.h"
#include "origin_circuit_st.h"
#include "or/or_circuit_st.h"
#include "or/origin_circuit_st.h"
static void
add_testing_cell_stats_entry(circuit_t *circ, uint8_t command,
+7 -7
View File
@@ -6,14 +6,14 @@
#include "orconfig.h"
#define CRYPTO_CURVE25519_PRIVATE
#define CRYPTO_RAND_PRIVATE
#include "or.h"
#include "test.h"
#include "aes.h"
#include "util.h"
#include "or/or.h"
#include "test/test.h"
#include "common/aes.h"
#include "common/util.h"
#include "siphash.h"
#include "crypto_curve25519.h"
#include "crypto_ed25519.h"
#include "crypto_rand.h"
#include "common/crypto_curve25519.h"
#include "common/crypto_ed25519.h"
#include "common/crypto_rand.h"
#include "ed25519_vectors.inc"
/** Run unit tests for Diffie-Hellman functionality. */
+6 -6
View File
@@ -7,15 +7,15 @@
#define CRYPTO_RAND_PRIVATE
#include "crypto_rand.h"
#include "util.h"
#include "util_format.h"
#include "compat.h"
#include "test.h"
#include "common/crypto_rand.h"
#include "common/util.h"
#include "common/util_format.h"
#include "common/compat.h"
#include "test/test.h"
#include <openssl/evp.h>
#include <openssl/rand.h>
#include "compat_openssl.h"
#include "common/compat_openssl.h"
/* Test for rectifying openssl RAND engine. */
static void
+5 -5
View File
@@ -5,11 +5,11 @@
#include "orconfig.h"
#define CRYPTO_S2K_PRIVATE
#include "or.h"
#include "test.h"
#include "crypto_s2k.h"
#include "crypto_pwbox.h"
#include "crypto_rand.h"
#include "or/or.h"
#include "test/test.h"
#include "common/crypto_s2k.h"
#include "common/crypto_pwbox.h"
#include "common/crypto_rand.h"
#if defined(HAVE_LIBSCRYPT_H) && defined(HAVE_LIBSCRYPT_SCRYPT)
#define HAVE_LIBSCRYPT
+1 -1
View File
@@ -3,7 +3,7 @@
* Copyright (c) 2007-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#include "test.h"
#include "test/test.h"
/* Our unit test expect that the AUTHORITY_CERT_* public keys will sort
* in this order. */
+39 -39
View File
@@ -17,46 +17,46 @@
#define NETWORKSTATUS_PRIVATE
#define RELAY_PRIVATE
#include "or.h"
#include "bridges.h"
#include "confparse.h"
#include "config.h"
#include "control.h"
#include "crypto_ed25519.h"
#include "crypto_rand.h"
#include "directory.h"
#include "dirserv.h"
#include "dirauth/dirvote.h"
#include "entrynodes.h"
#include "fp_pair.h"
#include "hibernate.h"
#include "memarea.h"
#include "networkstatus.h"
#include "router.h"
#include "routerkeys.h"
#include "routerlist.h"
#include "routerparse.h"
#include "routerset.h"
#include "dirauth/shared_random_state.h"
#include "test.h"
#include "test_dir_common.h"
#include "torcert.h"
#include "relay.h"
#include "log_test_helpers.h"
#include "voting_schedule.h"
#include "or/or.h"
#include "or/bridges.h"
#include "or/confparse.h"
#include "or/config.h"
#include "or/control.h"
#include "common/crypto_ed25519.h"
#include "common/crypto_rand.h"
#include "or/directory.h"
#include "or/dirserv.h"
#include "or/dirauth/dirvote.h"
#include "or/entrynodes.h"
#include "or/fp_pair.h"
#include "or/hibernate.h"
#include "common/memarea.h"
#include "or/networkstatus.h"
#include "or/router.h"
#include "or/routerkeys.h"
#include "or/routerlist.h"
#include "or/routerparse.h"
#include "or/routerset.h"
#include "or/dirauth/shared_random_state.h"
#include "test/test.h"
#include "test/test_dir_common.h"
#include "or/torcert.h"
#include "or/relay.h"
#include "test/log_test_helpers.h"
#include "or/voting_schedule.h"
#include "authority_cert_st.h"
#include "document_signature_st.h"
#include "extrainfo_st.h"
#include "networkstatus_st.h"
#include "networkstatus_voter_info_st.h"
#include "ns_detached_signatures_st.h"
#include "port_cfg_st.h"
#include "routerinfo_st.h"
#include "routerlist_st.h"
#include "tor_version_st.h"
#include "vote_microdesc_hash_st.h"
#include "vote_routerstatus_st.h"
#include "or/authority_cert_st.h"
#include "or/document_signature_st.h"
#include "or/extrainfo_st.h"
#include "or/networkstatus_st.h"
#include "or/networkstatus_voter_info_st.h"
#include "or/ns_detached_signatures_st.h"
#include "or/port_cfg_st.h"
#include "or/routerinfo_st.h"
#include "or/routerlist_st.h"
#include "or/tor_version_st.h"
#include "or/vote_microdesc_hash_st.h"
#include "or/vote_routerstatus_st.h"
#define NS_MODULE dir
+14 -14
View File
@@ -5,21 +5,21 @@
#include "orconfig.h"
#define DIRVOTE_PRIVATE
#include "test.h"
#include "container.h"
#include "or.h"
#include "dirauth/dirvote.h"
#include "nodelist.h"
#include "routerlist.h"
#include "test_dir_common.h"
#include "voting_schedule.h"
#include "test/test.h"
#include "common/container.h"
#include "or/or.h"
#include "or/dirauth/dirvote.h"
#include "or/nodelist.h"
#include "or/routerlist.h"
#include "test/test_dir_common.h"
#include "or/voting_schedule.h"
#include "authority_cert_st.h"
#include "networkstatus_st.h"
#include "networkstatus_voter_info_st.h"
#include "routerinfo_st.h"
#include "vote_microdesc_hash_st.h"
#include "vote_routerstatus_st.h"
#include "or/authority_cert_st.h"
#include "or/networkstatus_st.h"
#include "or/networkstatus_voter_info_st.h"
#include "or/routerinfo_st.h"
#include "or/vote_microdesc_hash_st.h"
#include "or/vote_routerstatus_st.h"
void dir_common_setup_vote(networkstatus_t **vote, time_t now);
networkstatus_t * dir_common_add_rs_and_parse(networkstatus_t *vote,
+3 -3
View File
@@ -3,9 +3,9 @@
* Copyright (c) 2007-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#include "or.h"
#include "networkstatus.h"
#include "routerparse.h"
#include "or/or.h"
#include "or/networkstatus.h"
#include "or/routerparse.h"
#define TEST_DIR_ROUTER_ID_1 3
#define TEST_DIR_ROUTER_ID_2 5
+30 -30
View File
@@ -9,37 +9,37 @@
#define CONFIG_PRIVATE
#define RENDCACHE_PRIVATE
#include "or.h"
#include "config.h"
#include "connection.h"
#include "consdiffmgr.h"
#include "directory.h"
#include "test.h"
#include "compress.h"
#include "rendcommon.h"
#include "rendcache.h"
#include "router.h"
#include "routerlist.h"
#include "rend_test_helpers.h"
#include "microdesc.h"
#include "test_helpers.h"
#include "nodelist.h"
#include "entrynodes.h"
#include "routerparse.h"
#include "networkstatus.h"
#include "proto_http.h"
#include "geoip.h"
#include "dirserv.h"
#include "dirauth/dirvote.h"
#include "log_test_helpers.h"
#include "voting_schedule.h"
#include "or/or.h"
#include "or/config.h"
#include "or/connection.h"
#include "or/consdiffmgr.h"
#include "or/directory.h"
#include "test/test.h"
#include "common/compress.h"
#include "or/rendcommon.h"
#include "or/rendcache.h"
#include "or/router.h"
#include "or/routerlist.h"
#include "test/rend_test_helpers.h"
#include "or/microdesc.h"
#include "test/test_helpers.h"
#include "or/nodelist.h"
#include "or/entrynodes.h"
#include "or/routerparse.h"
#include "or/networkstatus.h"
#include "or/proto_http.h"
#include "or/geoip.h"
#include "or/dirserv.h"
#include "or/dirauth/dirvote.h"
#include "test/log_test_helpers.h"
#include "or/voting_schedule.h"
#include "dir_connection_st.h"
#include "dir_server_st.h"
#include "networkstatus_st.h"
#include "rend_encoded_v2_service_descriptor_st.h"
#include "routerinfo_st.h"
#include "routerlist_st.h"
#include "or/dir_connection_st.h"
#include "or/dir_server_st.h"
#include "or/networkstatus_st.h"
#include "or/rend_encoded_v2_service_descriptor_st.h"
#include "or/routerinfo_st.h"
#include "or/routerlist_st.h"
#ifdef _WIN32
/* For mkdir() */
+7 -7
View File
@@ -1,17 +1,17 @@
/* Copyright (c) 2015-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#include "or.h"
#include "test.h"
#include "or/or.h"
#include "test/test.h"
#define DNS_PRIVATE
#include "dns.h"
#include "connection.h"
#include "router.h"
#include "or/dns.h"
#include "or/connection.h"
#include "or/router.h"
#include "edge_connection_st.h"
#include "or_circuit_st.h"
#include "or/edge_connection_st.h"
#include "or/or_circuit_st.h"
#define NS_MODULE dns
+15 -15
View File
@@ -5,23 +5,23 @@
#define TOR_CHANNEL_INTERNAL_
#define CIRCUITLIST_PRIVATE
#include "or.h"
#include "dos.h"
#include "circuitlist.h"
#include "crypto_rand.h"
#include "geoip.h"
#include "channel.h"
#include "microdesc.h"
#include "networkstatus.h"
#include "nodelist.h"
#include "routerlist.h"
#include "or/or.h"
#include "or/dos.h"
#include "or/circuitlist.h"
#include "common/crypto_rand.h"
#include "or/geoip.h"
#include "or/channel.h"
#include "or/microdesc.h"
#include "or/networkstatus.h"
#include "or/nodelist.h"
#include "or/routerlist.h"
#include "networkstatus_st.h"
#include "or_connection_st.h"
#include "routerstatus_st.h"
#include "or/networkstatus_st.h"
#include "or/or_connection_st.h"
#include "or/routerstatus_st.h"
#include "test.h"
#include "log_test_helpers.h"
#include "test/test.h"
#include "test/log_test_helpers.h"
static networkstatus_t *dummy_ns = NULL;
static networkstatus_t *
+12 -12
View File
@@ -6,21 +6,21 @@
#define CONNECTION_PRIVATE
#define CONNECTION_EDGE_PRIVATE
#include "or.h"
#include "test.h"
#include "or/or.h"
#include "test/test.h"
#include "addressmap.h"
#include "config.h"
#include "confparse.h"
#include "connection.h"
#include "connection_edge.h"
#include "nodelist.h"
#include "or/addressmap.h"
#include "or/config.h"
#include "or/confparse.h"
#include "or/connection.h"
#include "or/connection_edge.h"
#include "or/nodelist.h"
#include "hs_cache.h"
#include "rendcache.h"
#include "or/hs_cache.h"
#include "or/rendcache.h"
#include "entry_connection_st.h"
#include "socks_request_st.h"
#include "or/entry_connection_st.h"
#include "or/socks_request_st.h"
static void *
entryconn_rewrite_setup(const struct testcase_t *tc)
+29 -29
View File
@@ -10,38 +10,38 @@
#define ROUTERLIST_PRIVATE
#define DIRECTORY_PRIVATE
#include "or.h"
#include "test.h"
#include "or/or.h"
#include "test/test.h"
#include "bridges.h"
#include "circuitlist.h"
#include "circuitbuild.h"
#include "config.h"
#include "confparse.h"
#include "crypto_rand.h"
#include "directory.h"
#include "entrynodes.h"
#include "nodelist.h"
#include "networkstatus.h"
#include "policies.h"
#include "routerlist.h"
#include "routerparse.h"
#include "routerset.h"
#include "statefile.h"
#include "util.h"
#include "or/bridges.h"
#include "or/circuitlist.h"
#include "or/circuitbuild.h"
#include "or/config.h"
#include "or/confparse.h"
#include "common/crypto_rand.h"
#include "or/directory.h"
#include "or/entrynodes.h"
#include "or/nodelist.h"
#include "or/networkstatus.h"
#include "or/policies.h"
#include "or/routerlist.h"
#include "or/routerparse.h"
#include "or/routerset.h"
#include "or/statefile.h"
#include "common/util.h"
#include "cpath_build_state_st.h"
#include "crypt_path_st.h"
#include "dir_connection_st.h"
#include "microdesc_st.h"
#include "networkstatus_st.h"
#include "node_st.h"
#include "origin_circuit_st.h"
#include "routerinfo_st.h"
#include "routerstatus_st.h"
#include "or/cpath_build_state_st.h"
#include "or/crypt_path_st.h"
#include "or/dir_connection_st.h"
#include "or/microdesc_st.h"
#include "or/networkstatus_st.h"
#include "or/node_st.h"
#include "or/origin_circuit_st.h"
#include "or/routerinfo_st.h"
#include "or/routerstatus_st.h"
#include "test_helpers.h"
#include "log_test_helpers.h"
#include "test/test_helpers.h"
#include "test/log_test_helpers.h"
/* TODO:
* choose_random_entry() test with state set.
+11 -11
View File
@@ -4,19 +4,19 @@
#define CONNECTION_PRIVATE
#define EXT_ORPORT_PRIVATE
#define MAIN_PRIVATE
#include "or.h"
#include "buffers.h"
#include "connection.h"
#include "connection_or.h"
#include "config.h"
#include "control.h"
#include "crypto_rand.h"
#include "ext_orport.h"
#include "main.h"
#include "or/or.h"
#include "common/buffers.h"
#include "or/connection.h"
#include "or/connection_or.h"
#include "or/config.h"
#include "or/control.h"
#include "common/crypto_rand.h"
#include "or/ext_orport.h"
#include "or/main.h"
#include "or_connection_st.h"
#include "or/or_connection_st.h"
#include "test.h"
#include "test/test.h"
/* Test connection_or_remove_from_ext_or_id_map and
* connection_or_set_ext_or_identifier */
+4 -4
View File
@@ -8,10 +8,10 @@
/* These macros pull in declarations for some functions and structures that
* are typically file-private. */
#define GEOIP_PRIVATE
#include "or.h"
#include "config.h"
#include "geoip.h"
#include "test.h"
#include "or/or.h"
#include "or/config.h"
#include "or/geoip.h"
#include "test/test.h"
/* Record odd numbered fake-IPs using ipv6, even numbered fake-IPs
* using ipv4. Since our fake geoip database is the same between
+14 -14
View File
@@ -6,22 +6,22 @@
#define NETWORKSTATUS_PRIVATE
#include "orconfig.h"
#include "or.h"
#include "config.h"
#include "dirserv.h"
#include "container.h"
#include "entrynodes.h"
#include "util.h"
#include "routerparse.h"
#include "networkstatus.h"
#include "or/or.h"
#include "or/config.h"
#include "or/dirserv.h"
#include "common/container.h"
#include "or/entrynodes.h"
#include "common/util.h"
#include "or/routerparse.h"
#include "or/networkstatus.h"
#include "networkstatus_st.h"
#include "vote_microdesc_hash_st.h"
#include "vote_routerstatus_st.h"
#include "or/networkstatus_st.h"
#include "or/vote_microdesc_hash_st.h"
#include "or/vote_routerstatus_st.h"
#include "test.h"
#include "test_helpers.h"
#include "log_test_helpers.h"
#include "test/test.h"
#include "test/test_helpers.h"
#include "test/log_test_helpers.h"
/** Generate a vote_routerstatus_t for a router with identity digest
* <b>digest_in_hex</b>. */
+3 -3
View File
@@ -2,10 +2,10 @@
/* See LICENSE for licensing information */
#include "orconfig.h"
#include "test.h"
#include "test/test.h"
#include "util.h"
#include "handles.h"
#include "common/util.h"
#include "common/handles.h"
typedef struct demo_t {
HANDLE_ENTRY(demo, demo_t);
+19 -19
View File
@@ -12,27 +12,27 @@
#define MAIN_PRIVATE
#include "orconfig.h"
#include "or.h"
#include "or/or.h"
#include "buffers.h"
#include "config.h"
#include "confparse.h"
#include "connection.h"
#include "crypto_rand.h"
#include "main.h"
#include "nodelist.h"
#include "relay.h"
#include "routerlist.h"
#include "common/buffers.h"
#include "or/config.h"
#include "or/confparse.h"
#include "or/connection.h"
#include "common/crypto_rand.h"
#include "or/main.h"
#include "or/nodelist.h"
#include "or/relay.h"
#include "or/routerlist.h"
#include "cell_st.h"
#include "connection_st.h"
#include "node_st.h"
#include "origin_circuit_st.h"
#include "routerlist_st.h"
#include "or/cell_st.h"
#include "or/connection_st.h"
#include "or/node_st.h"
#include "or/origin_circuit_st.h"
#include "or/routerlist_st.h"
#include "test.h"
#include "test_helpers.h"
#include "test_connection.h"
#include "test/test.h"
#include "test/test_helpers.h"
#include "test/test_connection.h"
#ifdef HAVE_CFLAG_WOVERLENGTH_STRINGS
DISABLE_GCC_WARNING(overlength-strings)
@@ -40,7 +40,7 @@ DISABLE_GCC_WARNING(overlength-strings)
* at large. */
#endif
#include "test_descriptors.inc"
#include "circuitlist.h"
#include "or/circuitlist.h"
#ifdef HAVE_CFLAG_WOVERLENGTH_STRINGS
ENABLE_GCC_WARNING(overlength-strings)
#endif
+1 -1
View File
@@ -4,7 +4,7 @@
#ifndef TOR_TEST_HELPERS_H
#define TOR_TEST_HELPERS_H
#include "or.h"
#include "or/or.h"
const char *get_yesterday_date_str(void);
+14 -14
View File
@@ -12,22 +12,22 @@
#define RENDSERVICE_PRIVATE
#define HS_SERVICE_PRIVATE
#include "or.h"
#include "test.h"
#include "control.h"
#include "config.h"
#include "hs_common.h"
#include "rendcommon.h"
#include "rendservice.h"
#include "routerset.h"
#include "circuitbuild.h"
#include "or/or.h"
#include "test/test.h"
#include "or/control.h"
#include "or/config.h"
#include "or/hs_common.h"
#include "or/rendcommon.h"
#include "or/rendservice.h"
#include "or/routerset.h"
#include "or/circuitbuild.h"
#include "node_st.h"
#include "rend_encoded_v2_service_descriptor_st.h"
#include "rend_intro_point_st.h"
#include "routerinfo_st.h"
#include "or/node_st.h"
#include "or/rend_encoded_v2_service_descriptor_st.h"
#include "or/rend_intro_point_st.h"
#include "or/routerinfo_st.h"
#include "test_helpers.h"
#include "test/test_helpers.h"
/* mock ID digest and longname for node that's in nodelist */
#define HSDIR_EXIST_ID "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" \
+12 -12
View File
@@ -10,20 +10,20 @@
#define DIRECTORY_PRIVATE
#define HS_CACHE_PRIVATE
#include "ed25519_cert.h"
#include "hs_cache.h"
#include "rendcache.h"
#include "directory.h"
#include "networkstatus.h"
#include "connection.h"
#include "proto_http.h"
#include "trunnel/ed25519_cert.h"
#include "or/hs_cache.h"
#include "or/rendcache.h"
#include "or/directory.h"
#include "or/networkstatus.h"
#include "or/connection.h"
#include "or/proto_http.h"
#include "dir_connection_st.h"
#include "networkstatus_st.h"
#include "or/dir_connection_st.h"
#include "or/networkstatus_st.h"
#include "hs_test_helpers.h"
#include "test_helpers.h"
#include "test.h"
#include "test/hs_test_helpers.h"
#include "test/test_helpers.h"
#include "test/test.h"
/* Static variable used to encoded the HSDir query. */
static char query_b64[256];
+9 -9
View File
@@ -9,18 +9,18 @@
#define HS_INTROPOINT_PRIVATE
#define HS_SERVICE_PRIVATE
#include "test.h"
#include "test_helpers.h"
#include "log_test_helpers.h"
#include "test/test.h"
#include "test/test_helpers.h"
#include "test/log_test_helpers.h"
#include "crypto_ed25519.h"
#include "crypto_rand.h"
#include "hs_cell.h"
#include "hs_intropoint.h"
#include "hs_service.h"
#include "common/crypto_ed25519.h"
#include "common/crypto_rand.h"
#include "or/hs_cell.h"
#include "or/hs_intropoint.h"
#include "or/hs_service.h"
/* Trunnel. */
#include "hs/cell_establish_intro.h"
#include "trunnel/hs/cell_establish_intro.h"
/** We simulate the creation of an outgoing ESTABLISH_INTRO cell, and then we
* parse it from the receiver side. */
+28 -28
View File
@@ -14,37 +14,37 @@
#define CIRCUITLIST_PRIVATE
#define CONNECTION_PRIVATE
#include "test.h"
#include "test_helpers.h"
#include "log_test_helpers.h"
#include "rend_test_helpers.h"
#include "hs_test_helpers.h"
#include "test/test.h"
#include "test/test_helpers.h"
#include "test/log_test_helpers.h"
#include "test/rend_test_helpers.h"
#include "test/hs_test_helpers.h"
#include "config.h"
#include "crypto.h"
#include "channeltls.h"
#include "main.h"
#include "nodelist.h"
#include "routerset.h"
#include "or/config.h"
#include "common/crypto.h"
#include "or/channeltls.h"
#include "or/main.h"
#include "or/nodelist.h"
#include "or/routerset.h"
#include "hs_circuit.h"
#include "hs_client.h"
#include "hs_ident.h"
#include "hs_cache.h"
#include "circuitlist.h"
#include "circuitbuild.h"
#include "connection.h"
#include "connection_edge.h"
#include "networkstatus.h"
#include "or/hs_circuit.h"
#include "or/hs_client.h"
#include "or/hs_ident.h"
#include "or/hs_cache.h"
#include "or/circuitlist.h"
#include "or/circuitbuild.h"
#include "or/connection.h"
#include "or/connection_edge.h"
#include "or/networkstatus.h"
#include "cpath_build_state_st.h"
#include "crypt_path_st.h"
#include "dir_connection_st.h"
#include "entry_connection_st.h"
#include "extend_info_st.h"
#include "networkstatus_st.h"
#include "origin_circuit_st.h"
#include "socks_request_st.h"
#include "or/cpath_build_state_st.h"
#include "or/crypt_path_st.h"
#include "or/dir_connection_st.h"
#include "or/entry_connection_st.h"
#include "or/extend_info_st.h"
#include "or/networkstatus_st.h"
#include "or/origin_circuit_st.h"
#include "or/socks_request_st.h"
static int
mock_connection_ap_handshake_send_begin(entry_connection_t *ap_conn)
+25 -25
View File
@@ -11,33 +11,33 @@
#define HS_SERVICE_PRIVATE
#define NODELIST_PRIVATE
#include "test.h"
#include "test_helpers.h"
#include "log_test_helpers.h"
#include "hs_test_helpers.h"
#include "test/test.h"
#include "test/test_helpers.h"
#include "test/log_test_helpers.h"
#include "test/hs_test_helpers.h"
#include "connection_edge.h"
#include "crypto_rand.h"
#include "hs_common.h"
#include "hs_client.h"
#include "hs_service.h"
#include "config.h"
#include "networkstatus.h"
#include "directory.h"
#include "dirauth/dirvote.h"
#include "nodelist.h"
#include "routerlist.h"
#include "statefile.h"
#include "circuitlist.h"
#include "dirauth/shared_random.h"
#include "util.h"
#include "voting_schedule.h"
#include "or/connection_edge.h"
#include "common/crypto_rand.h"
#include "or/hs_common.h"
#include "or/hs_client.h"
#include "or/hs_service.h"
#include "or/config.h"
#include "or/networkstatus.h"
#include "or/directory.h"
#include "or/dirauth/dirvote.h"
#include "or/nodelist.h"
#include "or/routerlist.h"
#include "or/statefile.h"
#include "or/circuitlist.h"
#include "or/dirauth/shared_random.h"
#include "common/util.h"
#include "or/voting_schedule.h"
#include "microdesc_st.h"
#include "networkstatus_st.h"
#include "node_st.h"
#include "routerinfo_st.h"
#include "routerstatus_st.h"
#include "or/microdesc_st.h"
#include "or/networkstatus_st.h"
#include "or/node_st.h"
#include "or/routerinfo_st.h"
#include "or/routerstatus_st.h"
/** Test the validation of HS v3 addresses */
static void
+8 -8
View File
@@ -9,15 +9,15 @@
#define CONFIG_PRIVATE
#define HS_SERVICE_PRIVATE
#include "test.h"
#include "test_helpers.h"
#include "log_test_helpers.h"
#include "test/test.h"
#include "test/test_helpers.h"
#include "test/log_test_helpers.h"
#include "config.h"
#include "hs_common.h"
#include "hs_config.h"
#include "hs_service.h"
#include "rendservice.h"
#include "or/config.h"
#include "or/hs_common.h"
#include "or/hs_config.h"
#include "or/hs_service.h"
#include "or/rendservice.h"
static int
helper_config_service(const char *conf, int validate_only)
+10 -10
View File
@@ -8,18 +8,18 @@
#define CONTROL_PRIVATE
#include "or.h"
#include "test.h"
#include "control.h"
#include "config.h"
#include "hs_common.h"
#include "hs_control.h"
#include "nodelist.h"
#include "or/or.h"
#include "test/test.h"
#include "or/control.h"
#include "or/config.h"
#include "or/hs_common.h"
#include "or/hs_control.h"
#include "or/nodelist.h"
#include "node_st.h"
#include "routerstatus_st.h"
#include "or/node_st.h"
#include "or/routerstatus_st.h"
#include "test_helpers.h"
#include "test/test_helpers.h"
/* mock ID digest and longname for node that's in nodelist */
#define HSDIR_EXIST_ID \
+11 -11
View File
@@ -8,18 +8,18 @@
#define HS_DESCRIPTOR_PRIVATE
#include "crypto_ed25519.h"
#include "crypto_digest.h"
#include "crypto_rand.h"
#include "ed25519_cert.h"
#include "or.h"
#include "hs_descriptor.h"
#include "test.h"
#include "torcert.h"
#include "common/crypto_ed25519.h"
#include "common/crypto_digest.h"
#include "common/crypto_rand.h"
#include "trunnel/ed25519_cert.h"
#include "or/or.h"
#include "or/hs_descriptor.h"
#include "test/test.h"
#include "or/torcert.h"
#include "hs_test_helpers.h"
#include "test_helpers.h"
#include "log_test_helpers.h"
#include "test/hs_test_helpers.h"
#include "test/test_helpers.h"
#include "test/log_test_helpers.h"
#ifdef HAVE_CFLAG_WOVERLENGTH_STRINGS
DISABLE_GCC_WARNING(overlength-strings)
+17 -17
View File
@@ -11,29 +11,29 @@
#define RENDSERVICE_PRIVATE
#define CIRCUITLIST_PRIVATE
#include "test.h"
#include "log_test_helpers.h"
#include "crypto_rand.h"
#include "test/test.h"
#include "test/log_test_helpers.h"
#include "common/crypto_rand.h"
#include "or.h"
#include "circuitlist.h"
#include "circuituse.h"
#include "or/or.h"
#include "or/circuitlist.h"
#include "or/circuituse.h"
#include "ht.h"
#include "relay.h"
#include "rendservice.h"
#include "or/relay.h"
#include "or/rendservice.h"
#include "hs_cell.h"
#include "hs_circuitmap.h"
#include "hs_common.h"
#include "hs_intropoint.h"
#include "hs_service.h"
#include "or/hs_cell.h"
#include "or/hs_circuitmap.h"
#include "or/hs_common.h"
#include "or/hs_intropoint.h"
#include "or/hs_service.h"
#include "or_circuit_st.h"
#include "or/or_circuit_st.h"
/* Trunnel. */
#include "hs/cell_establish_intro.h"
#include "hs/cell_introduce1.h"
#include "hs/cell_common.h"
#include "trunnel/hs/cell_establish_intro.h"
#include "trunnel/hs/cell_introduce1.h"
#include "trunnel/hs/cell_common.h"
static size_t
new_establish_intro_cell(const char *circ_nonce,
+4 -4
View File
@@ -6,11 +6,11 @@
* \brief Test hidden service ntor functionality.
*/
#include "test.h"
#include "test_helpers.h"
#include "log_test_helpers.h"
#include "test/test.h"
#include "test/test_helpers.h"
#include "test/log_test_helpers.h"
#include "hs_ntor.h"
#include "or/hs_ntor.h"
/* Test the HS ntor handshake. Simulate the sending of an encrypted INTRODUCE1
* cell, and verify the proper derivation of decryption keys on the other end.
+7 -7
View File
@@ -13,13 +13,13 @@
#include <stdlib.h>
#define ONION_NTOR_PRIVATE
#include "or.h"
#include "util.h"
#include "compat.h"
#include "crypto.h"
#include "crypto_curve25519.h"
#include "hs_ntor.h"
#include "onion_ntor.h"
#include "or/or.h"
#include "common/util.h"
#include "common/compat.h"
#include "common/crypto.h"
#include "common/crypto_curve25519.h"
#include "or/hs_ntor.h"
#include "or/onion_ntor.h"
#define N_ARGS(n) STMT_BEGIN { \
if (argc < (n)) { \
+36 -36
View File
@@ -22,46 +22,46 @@
#define HS_CLIENT_PRIVATE
#define ROUTERPARSE_PRIVATE
#include "test.h"
#include "test_helpers.h"
#include "log_test_helpers.h"
#include "rend_test_helpers.h"
#include "hs_test_helpers.h"
#include "test/test.h"
#include "test/test_helpers.h"
#include "test/log_test_helpers.h"
#include "test/rend_test_helpers.h"
#include "test/hs_test_helpers.h"
#include "or.h"
#include "config.h"
#include "circuitbuild.h"
#include "circuitlist.h"
#include "circuituse.h"
#include "crypto_rand.h"
#include "dirauth/dirvote.h"
#include "networkstatus.h"
#include "nodelist.h"
#include "relay.h"
#include "routerparse.h"
#include "hs_common.h"
#include "hs_config.h"
#include "hs_ident.h"
#include "hs_intropoint.h"
#include "hs_ntor.h"
#include "hs_circuit.h"
#include "hs_service.h"
#include "hs_client.h"
#include "main.h"
#include "rendservice.h"
#include "statefile.h"
#include "dirauth/shared_random_state.h"
#include "voting_schedule.h"
#include "or/or.h"
#include "or/config.h"
#include "or/circuitbuild.h"
#include "or/circuitlist.h"
#include "or/circuituse.h"
#include "common/crypto_rand.h"
#include "or/dirauth/dirvote.h"
#include "or/networkstatus.h"
#include "or/nodelist.h"
#include "or/relay.h"
#include "or/routerparse.h"
#include "or/hs_common.h"
#include "or/hs_config.h"
#include "or/hs_ident.h"
#include "or/hs_intropoint.h"
#include "or/hs_ntor.h"
#include "or/hs_circuit.h"
#include "or/hs_service.h"
#include "or/hs_client.h"
#include "or/main.h"
#include "or/rendservice.h"
#include "or/statefile.h"
#include "or/dirauth/shared_random_state.h"
#include "or/voting_schedule.h"
#include "cpath_build_state_st.h"
#include "crypt_path_st.h"
#include "networkstatus_st.h"
#include "node_st.h"
#include "origin_circuit_st.h"
#include "routerinfo_st.h"
#include "or/cpath_build_state_st.h"
#include "or/crypt_path_st.h"
#include "or/networkstatus_st.h"
#include "or/node_st.h"
#include "or/origin_circuit_st.h"
#include "or/routerinfo_st.h"
/* Trunnel */
#include "hs/cell_establish_intro.h"
#include "trunnel/hs/cell_establish_intro.h"
static networkstatus_t mock_ns;
+4 -4
View File
@@ -2,12 +2,12 @@
/* See LICENSE for licensing information */
#include "orconfig.h"
#include "crypto.h"
#include "or.h"
#include "test.h"
#include "common/crypto.h"
#include "or/or.h"
#include "test/test.h"
#define RENDSERVICE_PRIVATE
#include "rendservice.h"
#include "or/rendservice.h"
static uint8_t v0_test_plaintext[] =
/* 20 bytes of rendezvous point nickname */
+4 -4
View File
@@ -3,11 +3,11 @@
#include "orconfig.h"
#define KEYPIN_PRIVATE
#include "or.h"
#include "keypin.h"
#include "util.h"
#include "or/or.h"
#include "or/keypin.h"
#include "common/util.h"
#include "test.h"
#include "test/test.h"
static void
test_keypin_parse_line(void *arg)
+17 -17
View File
@@ -8,26 +8,26 @@
#define TOR_CHANNEL_INTERNAL_
#define TORTLS_PRIVATE
#include "compat.h"
#include "common/compat.h"
#include "or.h"
#include "config.h"
#include "connection.h"
#include "connection_or.h"
#include "channeltls.h"
#include "link_handshake.h"
#include "router.h"
#include "routerkeys.h"
#include "scheduler.h"
#include "torcert.h"
#include "or/or.h"
#include "or/config.h"
#include "or/connection.h"
#include "or/connection_or.h"
#include "or/channeltls.h"
#include "trunnel/link_handshake.h"
#include "or/router.h"
#include "or/routerkeys.h"
#include "or/scheduler.h"
#include "or/torcert.h"
#include "or_connection_st.h"
#include "or_handshake_certs_st.h"
#include "or_handshake_state_st.h"
#include "var_cell_st.h"
#include "or/or_connection_st.h"
#include "or/or_handshake_certs_st.h"
#include "or/or_handshake_state_st.h"
#include "or/var_cell_st.h"
#include "test.h"
#include "log_test_helpers.h"
#include "test/test.h"
#include "test/log_test_helpers.h"
static var_cell_t *mock_got_var_cell = NULL;
+3 -3
View File
@@ -2,9 +2,9 @@
/* See LICENSE for licensing information */
#include "orconfig.h"
#include "or.h"
#include "torlog.h"
#include "test.h"
#include "or/or.h"
#include "common/torlog.h"
#include "test/test.h"
static void
dummy_cb_fn(int severity, uint32_t domain, const char *msg)
+4 -4
View File
@@ -6,11 +6,11 @@
* \brief Tests for functions closely related to the Tor main loop
*/
#include "test.h"
#include "log_test_helpers.h"
#include "test/test.h"
#include "test/log_test_helpers.h"
#include "or.h"
#include "main.h"
#include "or/or.h"
#include "or/main.h"
static const uint64_t BILLION = 1000000000;
+13 -13
View File
@@ -2,23 +2,23 @@
/* See LICENSE for licensing information */
#include "orconfig.h"
#include "or.h"
#include "or/or.h"
#include "config.h"
#include "or/config.h"
#define DIRVOTE_PRIVATE
#include "dirauth/dirvote.h"
#include "microdesc.h"
#include "networkstatus.h"
#include "routerlist.h"
#include "routerparse.h"
#include "torcert.h"
#include "or/dirauth/dirvote.h"
#include "or/microdesc.h"
#include "or/networkstatus.h"
#include "or/routerlist.h"
#include "or/routerparse.h"
#include "or/torcert.h"
#include "microdesc_st.h"
#include "networkstatus_st.h"
#include "routerinfo_st.h"
#include "routerstatus_st.h"
#include "or/microdesc_st.h"
#include "or/networkstatus_st.h"
#include "or/routerinfo_st.h"
#include "or/routerstatus_st.h"
#include "test.h"
#include "test/test.h"
#ifdef _WIN32
/* For mkdir() */
+11 -11
View File
@@ -6,19 +6,19 @@
* \brief Unit tests for nodelist related functions.
**/
#include "or.h"
#include "crypto_rand.h"
#include "networkstatus.h"
#include "nodelist.h"
#include "torcert.h"
#include "or/or.h"
#include "common/crypto_rand.h"
#include "or/networkstatus.h"
#include "or/nodelist.h"
#include "or/torcert.h"
#include "microdesc_st.h"
#include "networkstatus_st.h"
#include "node_st.h"
#include "routerinfo_st.h"
#include "routerstatus_st.h"
#include "or/microdesc_st.h"
#include "or/networkstatus_st.h"
#include "or/node_st.h"
#include "or/routerinfo_st.h"
#include "or/routerstatus_st.h"
#include "test.h"
#include "test/test.h"
/** Test the case when node_get_by_id() returns NULL,
* node_get_verbose_nickname_by_id should return the base 16 encoding
+6 -6
View File
@@ -6,12 +6,12 @@
#include <stdlib.h>
#define ONION_NTOR_PRIVATE
#include "or.h"
#include "util.h"
#include "compat.h"
#include "crypto.h"
#include "crypto_curve25519.h"
#include "onion_ntor.h"
#include "or/or.h"
#include "common/util.h"
#include "common/compat.h"
#include "common/crypto.h"
#include "common/crypto_curve25519.h"
#include "or/onion_ntor.h"
#define N_ARGS(n) STMT_BEGIN { \
if (argc < (n)) { \
+14 -14
View File
@@ -7,21 +7,21 @@
#define BUFFERS_PRIVATE
#define CIRCUITLIST_PRIVATE
#define CONNECTION_PRIVATE
#include "or.h"
#include "buffers.h"
#include "circuitlist.h"
#include "compat_libevent.h"
#include "connection.h"
#include "config.h"
#include "crypto_rand.h"
#include "relay.h"
#include "test.h"
#include "test_helpers.h"
#include "or/or.h"
#include "common/buffers.h"
#include "or/circuitlist.h"
#include "common/compat_libevent.h"
#include "or/connection.h"
#include "or/config.h"
#include "common/crypto_rand.h"
#include "or/relay.h"
#include "test/test.h"
#include "test/test_helpers.h"
#include "cell_st.h"
#include "entry_connection_st.h"
#include "or_circuit_st.h"
#include "origin_circuit_st.h"
#include "or/cell_st.h"
#include "or/entry_connection_st.h"
#include "or/or_circuit_st.h"
#include "or/origin_circuit_st.h"
/* small replacement mock for circuit_mark_for_close_ to avoid doing all
* the other bookkeeping that comes with marking circuits. */
+8 -8
View File
@@ -5,15 +5,15 @@
#define CONNECTION_PRIVATE
#include "or.h"
#include "config.h"
#include "connection.h"
#include "connection_or.h"
#include "main.h"
#include "test.h"
#include "or/or.h"
#include "or/config.h"
#include "or/connection.h"
#include "or/connection_or.h"
#include "or/main.h"
#include "test/test.h"
#include "dir_connection_st.h"
#include "or_connection_st.h"
#include "or/dir_connection_st.h"
#include "or/or_connection_st.h"
static or_options_t mock_options;
+12 -12
View File
@@ -4,21 +4,21 @@
/* See LICENSE for licensing information */
#define CONFIG_PRIVATE
#include "or.h"
#include "confparse.h"
#include "config.h"
#include "test.h"
#include "geoip.h"
#include "or/or.h"
#include "or/confparse.h"
#include "or/config.h"
#include "test/test.h"
#include "or/geoip.h"
#define ROUTERSET_PRIVATE
#include "routerset.h"
#include "main.h"
#include "log_test_helpers.h"
#include "or/routerset.h"
#include "or/main.h"
#include "test/log_test_helpers.h"
#include "sandbox.h"
#include "memarea.h"
#include "policies.h"
#include "test_helpers.h"
#include "common/sandbox.h"
#include "common/memarea.h"
#include "or/policies.h"
#include "test/test_helpers.h"
#define NS_MODULE test_options
+8 -8
View File
@@ -11,15 +11,15 @@
#define HS_SERVICE_PRIVATE
#define MAIN_PRIVATE
#include "test.h"
#include "test_helpers.h"
#include "test/test.h"
#include "test/test_helpers.h"
#include "or.h"
#include "config.h"
#include "hibernate.h"
#include "hs_service.h"
#include "main.h"
#include "periodic.h"
#include "or/or.h"
#include "or/config.h"
#include "or/hibernate.h"
#include "or/hs_service.h"
#include "or/main.h"
#include "or/periodic.h"
/** Helper function: This is replaced in some tests for the event callbacks so
* we don't actually go into the code path of those callbacks. */
+10 -10
View File
@@ -1,19 +1,19 @@
/* Copyright (c) 2013-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#include "or.h"
#include "or/or.h"
#define CONFIG_PRIVATE
#include "config.h"
#include "router.h"
#include "routerparse.h"
#include "or/config.h"
#include "or/router.h"
#include "or/routerparse.h"
#define POLICIES_PRIVATE
#include "policies.h"
#include "test.h"
#include "or/policies.h"
#include "test/test.h"
#include "node_st.h"
#include "port_cfg_st.h"
#include "routerinfo_st.h"
#include "routerstatus_st.h"
#include "or/node_st.h"
#include "or/port_cfg_st.h"
#include "or/routerinfo_st.h"
#include "or/routerstatus_st.h"
/* Helper: assert that short_policy parses and writes back out as itself,
or as <b>expected</b> if that's provided. */
+4 -4
View File
@@ -3,12 +3,12 @@
#define PROCMON_PRIVATE
#include "orconfig.h"
#include "or.h"
#include "test.h"
#include "or/or.h"
#include "test/test.h"
#include "procmon.h"
#include "common/procmon.h"
#include "log_test_helpers.h"
#include "test/log_test_helpers.h"
#define NS_MODULE procmon
+5 -5
View File
@@ -6,11 +6,11 @@
* \brief Tests for our HTTP protocol parser code
*/
#include "or.h"
#include "test.h"
#include "buffers.h"
#include "proto_http.h"
#include "log_test_helpers.h"
#include "or/or.h"
#include "test/test.h"
#include "common/buffers.h"
#include "or/proto_http.h"
#include "test/log_test_helpers.h"
#define S(str) str, sizeof(str)-1
+9 -9
View File
@@ -6,16 +6,16 @@
* \brief Test our smaller buffer-based protocol functions
*/
#include "or.h"
#include "test.h"
#include "buffers.h"
#include "connection_or.h"
#include "ext_orport.h"
#include "proto_cell.h"
#include "proto_control0.h"
#include "proto_ext_or.h"
#include "or/or.h"
#include "test/test.h"
#include "common/buffers.h"
#include "or/connection_or.h"
#include "or/ext_orport.h"
#include "or/proto_cell.h"
#include "or/proto_control0.h"
#include "or/proto_ext_or.h"
#include "var_cell_st.h"
#include "or/var_cell_st.h"
static void
test_proto_var_cell(void *arg)
+4 -4
View File
@@ -4,12 +4,12 @@
#define PROTOVER_PRIVATE
#include "orconfig.h"
#include "test.h"
#include "test/test.h"
#include "protover.h"
#include "or/protover.h"
#include "or.h"
#include "connection_or.h"
#include "or/or.h"
#include "or/connection_or.h"
static void
test_protover_parse(void *arg)
+9 -9
View File
@@ -8,15 +8,15 @@
#define UTIL_PRIVATE
#define STATEFILE_PRIVATE
#define CONTROL_PRIVATE
#include "or.h"
#include "config.h"
#include "confparse.h"
#include "control.h"
#include "transports.h"
#include "circuitbuild.h"
#include "util.h"
#include "statefile.h"
#include "test.h"
#include "or/or.h"
#include "or/config.h"
#include "or/confparse.h"
#include "or/control.h"
#include "or/transports.h"
#include "or/circuitbuild.h"
#include "common/util.h"
#include "or/statefile.h"
#include "test/test.h"
static void
reset_mp(managed_proxy_t *mp)

Some files were not shown because too many files have changed in this diff Show More