Merge remote-tracking branch 'origin/maint-0.2.7'

This commit is contained in:
Nick Mathewson 2015-09-29 10:12:05 +02:00
commit 3d8a045bd6
6 changed files with 24 additions and 3 deletions

7
changes/bug17151 Normal file
View File

@ -0,0 +1,7 @@
o Minor bugfixes (portability):
- Use libexecinfo on FreeBSD, to enable backtrace support. Fixes part of
bug 17151; bugfix on 0.2.5.2-alpha. Patch from Marcin Cieślak.
o Minor bugfixes (testing):
- Skip backtrace tests when backtrace support is not compiled in. Fixes
part of bug 17151; bugfix on 0.2.7.1-alpha. Patch from Marcin Cieślak.

3
changes/bug17154 Normal file
View File

@ -0,0 +1,3 @@
o Minor bugfixes (testing):
- Fix breakage when running 'make check' with BSD make. Fixes bug
17154; bugfix on 0.2.7.3-rc. Patch by Marcin Cieślak.

View File

@ -360,6 +360,7 @@ AC_SEARCH_LIBS(socket, [socket network])
AC_SEARCH_LIBS(gethostbyname, [nsl])
AC_SEARCH_LIBS(dlopen, [dl])
AC_SEARCH_LIBS(inet_aton, [resolv])
AC_SEARCH_LIBS(backtrace, [execinfo])
saved_LIBS="$LIBS"
AC_SEARCH_LIBS([clock_gettime], [rt])
if test "$LIBS" != "$saved_LIBS"; then

View File

@ -123,9 +123,9 @@ src_or_tor_cov_LDADD = src/or/libtor-testing.a src/common/libor-testing.a \
src/common/libor-event-testing.a src/trunnel/libor-trunnel-testing.a \
@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
@TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ @TOR_SYSTEMD_LIBS@
export TESTING_TOR_BINARY = $(top_builddir)/src/or/tor-cov
export TESTING_TOR_BINARY=$(top_builddir)/src/or/tor-cov
else
export TESTING_TOR_BINARY = $(top_builddir)/src/or/tor
export TESTING_TOR_BINARY=$(top_builddir)/src/or/tor
endif
ORHEADERS = \

View File

@ -3,6 +3,7 @@
exitcode=0
"${builddir:-.}/src/test/test-bt-cl" backtraces || exit 77
"${builddir:-.}/src/test/test-bt-cl" assert | "${PYTHON:-python}" "${abs_top_srcdir:-.}/src/test/bt_test.py" || exitcode=1
"${builddir:-.}/src/test/test-bt-cl" crash | "${PYTHON:-python}" "${abs_top_srcdir:-.}/src/test/bt_test.py" || exitcode=1

View File

@ -84,15 +84,24 @@ main(int argc, char **argv)
if (argc < 2) {
puts("I take an argument. It should be \"assert\" or \"crash\" or "
"\"none\"");
"\"backtraces\" or \"none\"");
return 1;
}
#if !(defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && \
defined(HAVE_BACKTRACE_SYMBOLS_FD) && defined(HAVE_SIGACTION))
puts("Backtrace reporting is not supported on this platform");
return 77;
#endif
if (!strcmp(argv[1], "assert")) {
crashtype = 1;
} else if (!strcmp(argv[1], "crash")) {
crashtype = 0;
} else if (!strcmp(argv[1], "none")) {
crashtype = -1;
} else if (!strcmp(argv[1], "backtraces")) {
return 0;
} else {
puts("Argument should be \"assert\" or \"crash\" or \"none\"");
return 1;