aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_hs_control.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2020-02-04 09:56:25 -0500
committerGeorge Kadianakis <desnacked@riseup.net>2020-02-06 12:54:54 +0200
commita8456d2a11c35d7e707bb1395d56115227104b34 (patch)
tree80d2e3955a909cf73bdfcaa3a1eab19a2b811c03 /src/test/test_hs_control.c
parent9278a24729c92b9f5c670b3e1608e2cdbd8bd9a1 (diff)
downloadtor-a8456d2a11c35d7e707bb1395d56115227104b34.tar.gz
tor-a8456d2a11c35d7e707bb1395d56115227104b34.zip
test: Missing hs_init() in some hs_control tests
Without the hs_init(), the caches are not initialized and the previous commit was causing an assert due to the missing caches. But regardless of that, those tests were not initializing but were calling hs_free_all(). Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/test/test_hs_control.c')
-rw-r--r--src/test/test_hs_control.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/test_hs_control.c b/src/test/test_hs_control.c
index dc0db18bdc..881479016f 100644
--- a/src/test/test_hs_control.c
+++ b/src/test/test_hs_control.c
@@ -218,6 +218,8 @@ test_hs_control_good_onion_client_auth_add(void *arg)
char *cp1 = NULL;
size_t sz;
+ hs_init();
+
{ /* Setup the control conn */
memset(&conn, 0, sizeof(control_connection_t));
TO_CONN(&conn)->outbuf = buf_new();
@@ -415,6 +417,8 @@ test_hs_control_bad_onion_client_auth_add(void *arg)
size_t sz;
char *args = NULL;
+ hs_init();
+
{ /* Setup the control conn */
memset(&conn, 0, sizeof(control_connection_t));
TO_CONN(&conn)->outbuf = buf_new();
@@ -493,6 +497,8 @@ test_hs_control_store_permanent_creds(void *arg)
size_t sz;
+ hs_init();
+
{ /* Setup the control conn */
memset(&conn, 0, sizeof(control_connection_t));
TO_CONN(&conn)->outbuf = buf_new();