[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] More coverage in backtrace.c
commit 2b74e13a7cd965929dc2965b3c57a48a5b395f1a
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Mon Jun 20 10:31:36 2016 -0400
More coverage in backtrace.c
---
src/common/backtrace.c | 4 ++++
src/test/test_bt.sh | 2 ++
2 files changed, 6 insertions(+)
diff --git a/src/common/backtrace.c b/src/common/backtrace.c
index afdc10d..2841281 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 fe17816..312905a 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}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits