aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-04-25 10:59:19 -0400
committerNick Mathewson <nickm@torproject.org>2017-04-25 10:59:19 -0400
commit43db91bd87a6f197a93285a87df473616cc1f6c2 (patch)
tree681c24e9721d4f0eaac754bdcc55c5b28546625a
parent7a37cbbea33896da54ea4785d8b08c3e5752dcd2 (diff)
downloadtor-43db91bd87a6f197a93285a87df473616cc1f6c2.tar.gz
tor-43db91bd87a6f197a93285a87df473616cc1f6c2.zip
Teach cov-exclude to detect runaway LCOV_EXCL_START lines
Also, fix two instances of runaway LCOV_EXCL_START lines.
-rwxr-xr-xscripts/test/cov-exclude6
-rw-r--r--src/common/address.c2
-rw-r--r--src/or/onion_tap.c2
3 files changed, 8 insertions, 2 deletions
diff --git a/scripts/test/cov-exclude b/scripts/test/cov-exclude
index 5117f11ec4..5cb9b1282d 100755
--- a/scripts/test/cov-exclude
+++ b/scripts/test/cov-exclude
@@ -26,3 +26,9 @@ if ($excluding or $exclude_this) {
s{^\s*\#\#+:}{ x:};
s{^ (\s*)(\d+):}{$1!!!$2:};
}
+
+if (eof and $excluding) {
+ warn "Runaway LCOV_EXCL_START in $ARGV";
+ $excluding = 0;
+}
+
diff --git a/src/common/address.c b/src/common/address.c
index 701daace57..c5d0e918ca 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -1198,7 +1198,7 @@ tor_addr_hash(const tor_addr_t *addr)
/* LCOV_EXCL_START */
tor_fragile_assert();
return 0;
- /* LCOV_EXCL_END */
+ /* LCOV_EXCL_STOP */
}
}
diff --git a/src/or/onion_tap.c b/src/or/onion_tap.c
index 9a65fcf014..294fc0df6d 100644
--- a/src/or/onion_tap.c
+++ b/src/or/onion_tap.c
@@ -159,7 +159,7 @@ onion_skin_TAP_server_handshake(
* big. That should be impossible. */
log_info(LD_GENERAL, "crypto_dh_get_public failed.");
goto err;
- /* LCOV_EXCP_STOP */
+ /* LCOV_EXCL_STOP */
}
key_material_len = DIGEST_LEN+key_out_len;