summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-03-25 12:11:59 -0400
committerNick Mathewson <nickm@torproject.org>2019-03-25 12:11:59 -0400
commita49f506e05364eb0fd14d02e3cd482941942928e (patch)
treee48ab73919520424a82c80dc6c1faf574913e822 /src/test
parentd4d541c53c209370ae33f5f6caad2ec13743a4ba (diff)
downloadtor-a49f506e05364eb0fd14d02e3cd482941942928e.tar.gz
tor-a49f506e05364eb0fd14d02e3cd482941942928e.zip
Split all controller events code into a new control_events.c
Also, split the formatting code shared by control.c and control_events.c into controller_fmt.c.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_controller_events.c3
-rw-r--r--src/test/test_extorport.c2
-rw-r--r--src/test/test_hs.c3
-rw-r--r--src/test/test_hs_control.c3
-rw-r--r--src/test/test_pt.c4
-rw-r--r--src/test/test_util.c1
-rw-r--r--src/test/testing_common.c1
7 files changed, 12 insertions, 5 deletions
diff --git a/src/test/test_controller_events.c b/src/test/test_controller_events.c
index 647eac43c7..910aacace3 100644
--- a/src/test/test_controller_events.c
+++ b/src/test/test_controller_events.c
@@ -4,6 +4,7 @@
#define CONNECTION_PRIVATE
#define TOR_CHANNEL_INTERNAL_
#define CONTROL_PRIVATE
+#define CONTROL_EVENTS_PRIVATE
#define OCIRC_EVENT_PRIVATE
#define ORCONN_EVENT_PRIVATE
#include "core/or/or.h"
@@ -13,7 +14,7 @@
#include "core/or/ocirc_event.h"
#include "core/or/orconn_event.h"
#include "core/mainloop/connection.h"
-#include "feature/control/control.h"
+#include "feature/control/control_events.h"
#include "test/test.h"
#include "core/or/or_circuit_st.h"
diff --git a/src/test/test_extorport.c b/src/test/test_extorport.c
index aeb71ec583..f5d16af921 100644
--- a/src/test/test_extorport.c
+++ b/src/test/test_extorport.c
@@ -9,7 +9,7 @@
#include "core/mainloop/connection.h"
#include "core/or/connection_or.h"
#include "app/config/config.h"
-#include "feature/control/control.h"
+#include "feature/control/control_events.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "feature/relay/ext_orport.h"
#include "core/mainloop/mainloop.h"
diff --git a/src/test/test_hs.c b/src/test/test_hs.c
index a611b46ca6..de10a10d81 100644
--- a/src/test/test_hs.c
+++ b/src/test/test_hs.c
@@ -6,7 +6,7 @@
* \brief Unit tests for hidden service.
**/
-#define CONTROL_PRIVATE
+#define CONTROL_EVENTS_PRIVATE
#define CIRCUITBUILD_PRIVATE
#define RENDCOMMON_PRIVATE
#define RENDSERVICE_PRIVATE
@@ -15,6 +15,7 @@
#include "core/or/or.h"
#include "test/test.h"
#include "feature/control/control.h"
+#include "feature/control/control_events.h"
#include "app/config/config.h"
#include "feature/hs/hs_common.h"
#include "feature/rend/rendcommon.h"
diff --git a/src/test/test_hs_control.c b/src/test/test_hs_control.c
index ba67712f1b..d23d31954b 100644
--- a/src/test/test_hs_control.c
+++ b/src/test/test_hs_control.c
@@ -6,11 +6,12 @@
* \brief Unit tests for hidden service control port event and command.
**/
-#define CONTROL_PRIVATE
+#define CONTROL_EVENTS_PRIVATE
#include "core/or/or.h"
#include "test/test.h"
#include "feature/control/control.h"
+#include "feature/control/control_events.h"
#include "app/config/config.h"
#include "feature/hs/hs_common.h"
#include "feature/hs/hs_control.h"
diff --git a/src/test/test_pt.c b/src/test/test_pt.c
index d2996f4cc3..612006906d 100644
--- a/src/test/test_pt.c
+++ b/src/test/test_pt.c
@@ -7,12 +7,14 @@
#define PT_PRIVATE
#define UTIL_PRIVATE
#define STATEFILE_PRIVATE
-#define CONTROL_PRIVATE
+//#define CONTROL_PRIVATE
+#define CONTROL_EVENTS_PRIVATE
#define PROCESS_PRIVATE
#include "core/or/or.h"
#include "app/config/config.h"
#include "app/config/confparse.h"
#include "feature/control/control.h"
+#include "feature/control/control_events.h"
#include "feature/client/transports.h"
#include "core/or/circuitbuild.h"
#include "app/config/statefile.h"
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 4990aa709a..4875a7c943 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -16,6 +16,7 @@
#include "lib/buf/buffers.h"
#include "app/config/config.h"
#include "feature/control/control.h"
+#include "feature/control/control_fmt.h"
#include "feature/client/transports.h"
#include "lib/crypt_ops/crypto_format.h"
#include "lib/crypt_ops/crypto_rand.h"
diff --git a/src/test/testing_common.c b/src/test/testing_common.c
index 8fc8ef7830..1c2a2e8960 100644
--- a/src/test/testing_common.c
+++ b/src/test/testing_common.c
@@ -12,6 +12,7 @@
#include "orconfig.h"
#include "core/or/or.h"
#include "feature/control/control.h"
+#include "feature/control/control_events.h"
#include "app/config/config.h"
#include "lib/crypt_ops/crypto_dh.h"
#include "lib/crypt_ops/crypto_ed25519.h"