aboutsummaryrefslogtreecommitdiff
path: root/src/test/testing_common.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-04-26 14:38:43 -0400
committerNick Mathewson <nickm@torproject.org>2018-04-26 14:39:26 -0400
commit302908657f492f064f9bddac794db477f53ab958 (patch)
treecc3003c3eb8b9dfeb2b0b7e1eff9ad1ae8808545 /src/test/testing_common.c
parent9fd319168bdedbdfba931d1deceb4653a4dff61b (diff)
downloadtor-302908657f492f064f9bddac794db477f53ab958.tar.gz
tor-302908657f492f064f9bddac794db477f53ab958.zip
Fix a test assertion failure due to uninitialized mainloop events
Bug not in any released Tor.
Diffstat (limited to 'src/test/testing_common.c')
-rw-r--r--src/test/testing_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/testing_common.c b/src/test/testing_common.c
index b9b36d96d0..312c07471d 100644
--- a/src/test/testing_common.c
+++ b/src/test/testing_common.c
@@ -8,6 +8,7 @@
* \brief Common pieces to implement unit tests.
**/
+#define MAIN_PRIVATE
#include "orconfig.h"
#include "or.h"
#include "control.h"
@@ -16,6 +17,7 @@
#include "backtrace.h"
#include "test.h"
#include "channelpadding.h"
+#include "main.h"
#include <stdio.h>
#ifdef HAVE_FCNTL_H
@@ -290,6 +292,7 @@ main(int c, const char **v)
}
rep_hist_init();
setup_directory();
+ initialize_mainloop_events();
options_init(options);
options->DataDirectory = tor_strdup(temp_dir);
tor_asprintf(&options->KeyDirectory, "%s"PATH_SEPARATOR"keys",