[libsoup] coverage: Ignore more false positives
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] coverage: Ignore more false positives
- Date: Sun, 6 Dec 2020 20:33:29 +0000 (UTC)
commit ecaeebddc64ead530ca86a429da77dd50b629978
Author: Patrick Griffis <pgriffis igalia com>
Date: Sun Dec 6 13:56:47 2020 -0600
coverage: Ignore more false positives
.gitlab-ci/lcovrc | 5 +++--
tests/websocket-test.c | 2 ++
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci/lcovrc b/.gitlab-ci/lcovrc
index ac5997b7..45a2b3ea 100644
--- a/.gitlab-ci/lcovrc
+++ b/.gitlab-ci/lcovrc
@@ -7,7 +7,8 @@ lcov_branch_coverage = 1
# Exclude precondition assertions, as we can never reasonably get full branch
# coverage of them, as they should never normally fail.
# See https://github.com/linux-test-project/lcov/issues/44
-lcov_excl_br_line = LCOV_EXCL_BR_LINE|g_return_if_fail|g_return_val_if_fail|g_assert|g_assert_
+# Also ignore g_clear macros as we don't care about the NULL path often
+lcov_excl_br_line =
LCOV_EXCL_BR_LINE|g_return_if_fail|g_return_val_if_fail|g_assert|g_assert_|g_warn_if_fail|soup_test_assert|soup_test_assert_|g_clear_
# Similarly for unreachable assertions.
-lcov_excl_line = LCOV_EXCL_LINE|g_return_if_reached|g_return_val_if_reached|g_assert_not_reached
+lcov_excl_line =
LCOV_EXCL_LINE|g_return_if_reached|g_return_val_if_reached|g_assert_not_reached|g_warn_if_reached
diff --git a/tests/websocket-test.c b/tests/websocket-test.c
index 95ed7b12..d045d966 100644
--- a/tests/websocket-test.c
+++ b/tests/websocket-test.c
@@ -51,6 +51,7 @@ typedef struct {
while (!(cond)) g_main_context_iteration (NULL, TRUE); \
G_STMT_END
+/* LCOV_EXCL_START */
static void
on_error_not_reached (SoupWebsocketConnection *ws,
GError *error,
@@ -59,6 +60,7 @@ on_error_not_reached (SoupWebsocketConnection *ws,
/* At this point we know this will fail, but is informative */
g_assert_no_error (error);
}
+/* LCOV_EXCL_STOP */
static void
on_error_copy (SoupWebsocketConnection *ws,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]