Excluding specific branches from coverage results #210
Replies: 2 comments 3 replies
-
For Verilog code: yes. For C/C++: no (at least to my knowledge). |
Beta Was this translation helpful? Give feedback.
-
Another observation: if you are using a differential coverage methodology, then branches that you investigated and signed off will appear in a different category than new/changed code in your next build. You won't need to check then again unless/until your code changes, and they change category to one you know you need to look at. |
Beta Was this translation helpful? Give feedback.
-
I have a case in which inline functions result in more branches on a line than are easily visible from the code:
deque.empty()
is inlined todeque.m_head == deque.m_tail
and that, in turn, expands with:I really don't need to test (nor am I sure I COULD test) the
m_norm
not equal branch in places where I use.empty()
, but if I useLCOV_EXCL_BR_LINE
I will lose ALL of the branch coverage for.empty()
.Has anyone suggested or tried to implement something like
LCOV_EXCL_BR[x]
to exclude a specific branch from counting against the coverage, where x is an index into the branches present on the line?Beta Was this translation helpful? Give feedback.
All reactions