]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Initialize crash handler in unit tests
authorNick Mathewson <nickm@torproject.org>
Wed, 27 Aug 2014 22:15:02 +0000 (18:15 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 28 Aug 2014 00:03:00 +0000 (20:03 -0400)
This way, we don't get locking failures when we hit an assertion in
the unit tests.  Also, we might find out about unit test bugs from
folks who can't do gdb.

changes/crash_handler_in_tests [new file with mode: 0644]
src/test/test.c

diff --git a/changes/crash_handler_in_tests b/changes/crash_handler_in_tests
new file mode 100644 (file)
index 0000000..d2bfdde
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor features:
+    - Enable the backtrace handler (where supported) when running the
+      unit tests.
index f1efc3db03a673155ca6ecabb54058a3b106ccdb..98552dc92886c59bced414083d0265da4e752f83 100644 (file)
@@ -43,6 +43,7 @@ long int lround(double x);
 double fabs(double x);
 
 #include "or.h"
+#include "backtrace.h"
 #include "buffers.h"
 #include "circuitlist.h"
 #include "circuitstats.h"
@@ -1379,6 +1380,7 @@ main(int c, const char **v)
   options = options_new();
   tor_threads_init();
   init_logging();
+  configure_backtrace_handler(get_version());
 
   for (i_out = i = 1; i < c; ++i) {
     if (!strcmp(v[i], "--warn")) {