aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-06-20 10:31:36 -0400
committerNick Mathewson <nickm@torproject.org>2016-06-20 10:31:36 -0400
commit2b74e13a7cd965929dc2965b3c57a48a5b395f1a (patch)
tree0744f15a60d24627ce430a2102514cca35fd8e77 /src
parentc1f0ec3058117d7f0feca09b9ed9d7fa2e71e5a5 (diff)
downloadtor-2b74e13a7cd965929dc2965b3c57a48a5b395f1a.tar.gz
tor-2b74e13a7cd965929dc2965b3c57a48a5b395f1a.zip
More coverage in backtrace.c
Diffstat (limited to 'src')
-rw-r--r--src/common/backtrace.c4
-rwxr-xr-xsrc/test/test_bt.sh2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/common/backtrace.c b/src/common/backtrace.c
index afdc10d6a9..2841281927 100644
--- a/src/common/backtrace.c
+++ b/src/common/backtrace.c
@@ -109,8 +109,10 @@ log_backtrace(int severity, int domain, const char *msg)
tor_log(severity, domain, "%s. Stack trace:", msg);
if (!symbols) {
+ /* LCOV_EXCL_START -- we can't provoke this. */
tor_log(severity, domain, " Unable to generate backtrace.");
goto done;
+ /* LCOV_EXCL_STOP */
}
for (i=0; i < depth; ++i) {
tor_log(severity, domain, " %s", symbols[i]);
@@ -173,8 +175,10 @@ install_bt_handler(void)
for (i = 0; trap_signals[i] >= 0; ++i) {
if (sigaction(trap_signals[i], &sa, NULL) == -1) {
+ /* LCOV_EXCL_START */
log_warn(LD_BUG, "Sigaction failed: %s", strerror(errno));
rv = -1;
+ /* LCOV_EXCL_STOP */
}
}
diff --git a/src/test/test_bt.sh b/src/test/test_bt.sh
index fe1781659d..312905a4e2 100755
--- a/src/test/test_bt.sh
+++ b/src/test/test_bt.sh
@@ -8,4 +8,6 @@ export ASAN_OPTIONS="handle_segv=0:allow_user_segv_handler=1"
"${builddir:-.}/src/test/test-bt-cl" assert 2>&1 | "${PYTHON:-python}" "${abs_top_srcdir:-.}/src/test/bt_test.py" || exitcode="$?"
"${builddir:-.}/src/test/test-bt-cl" crash 2>&1 | "${PYTHON:-python}" "${abs_top_srcdir:-.}/src/test/bt_test.py" || exitcode="$?"
+"${builddir:-.}/src/test/test-bt-cl" none || exitcode="$?"
+
exit ${exitcode}