diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-08-27 18:15:02 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-08-27 20:03:00 -0400 |
commit | 9f9b19ed7b06d8313a9bcbd6647fa097ec0a059d (patch) | |
tree | 6e525230b248326b299491f62f626ca535354600 | |
parent | fdb7fc70d03d21d967db4928960241a624483a24 (diff) | |
download | tor-9f9b19ed7b06d8313a9bcbd6647fa097ec0a059d.tar.gz tor-9f9b19ed7b06d8313a9bcbd6647fa097ec0a059d.zip |
Initialize crash handler in unit tests
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.
-rw-r--r-- | changes/crash_handler_in_tests | 3 | ||||
-rw-r--r-- | src/test/test.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/changes/crash_handler_in_tests b/changes/crash_handler_in_tests new file mode 100644 index 0000000000..d2bfdde784 --- /dev/null +++ b/changes/crash_handler_in_tests @@ -0,0 +1,3 @@ + o Minor features: + - Enable the backtrace handler (where supported) when running the + unit tests. diff --git a/src/test/test.c b/src/test/test.c index f1efc3db03..98552dc928 100644 --- a/src/test/test.c +++ b/src/test/test.c @@ -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")) { |