• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

c-ares / c-ares / #1019
92%

Build:
DEFAULT BRANCH: main
Ran 14 Jun 2024 01:03PM UTC
Jobs 1
Files 156
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Jun 2024 12:59PM UTC coverage: 89.12% (+8.5%) from 80.622%
#1019

push

travis-ci

web-flow
Coverage code annotations for identification of desirable paths that need testing (#775)

Add code annotations for ignoring specific code paths for coverage
calculations. The primary purpose of this is to make it easy to see the
code paths that we could (and probably should) write test cases for, as
these would have the most impact on delivery of a stable product.

The annotations used are:
`LCOV_EXCL_LINE: <designation>`, `LCOV_EXCL_START: <designation>`,
`LCOV_EXCL_STOP`

Unfortunately `LCOV_EXCL_BR_LINE` does not appear to be supported by
coveralls as it would have been a more elegant solution over START/STOP.

We specifically include the `<designation>` not just for future
reference but because it makes it easy to identify in case we want to
address these conditions in a different way in the future.

The main areas designated for exclusion are:
1. `OutOfMemory` - these are hard to test cases, and on modern systems,
are likely to never occur due to optimistic memory allocations, which
can then later cause the kernel to terminate your application due to
memory not actually being available. c-ares does have *some* testing
framework for this, if we wish to expand in the future, we can easily
use sed to get rid of of these annotations.
2. `DefensiveCoding` - these are impossible to reach paths at the point
in time the code was written. They are there for defensive coding in
case code is refactored in the future to prevent unexpected behavior.
3. `UntestablePath` - these are code paths that aren't possible to test,
such as failure of a system call.
4. `FallbackCode` - This is an entire set of code that is untestable
because its not able to simulate a failure of the primary path.

This PR also does add some actual coverage in the test cases where it is
easy to do.

Fix By: Brad House (@bradh352)

14 of 15 new or added lines in 9 files covered. (93.33%)

3 existing lines in 3 files now uncovered.

8937 of 10028 relevant lines covered (89.12%)

4245.08 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #1019.1 14 Jun 2024 01:03PM UTC 0
89.12
Source Files on build #1019
Detailed source file information is not available for this build.
  • Back to Repo
  • c0d41d08 on github
  • Prev Build on main
  • Next Build on main
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc