]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
test: Missing hs_init() in some hs_control tests
authorDavid Goulet <dgoulet@torproject.org>
Tue, 4 Feb 2020 14:56:25 +0000 (09:56 -0500)
committerGeorge Kadianakis <desnacked@riseup.net>
Thu, 6 Feb 2020 10:54:54 +0000 (12:54 +0200)
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>
src/test/test_hs_control.c

index dc0db18bdc82a53517b9862c4972b94fb2bf47b3..881479016fa3f1665bbf93b27ec764bf94d1eb47 100644 (file)
@@ -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();