Construction junction, what's that function?
I saw something puzzling today while using zcov – a function I didn’t write that had no coverage. In my parsing code I have a small struct, something like this:
programs. applied.
Patch provides expert programming, training, and consulting services.
I saw something puzzling today while using zcov – a function I didn’t write that had no coverage. In my parsing code I have a small struct, something like this:
This post is based on an interesting case NASA brought me; a small
test program with a phantom condition. In the example, timed_out()
is always true, which means checkout()
cannot satisfy MC/DC, but
let’s pretend it does something interesting. The function has one
decision with two conditions, and four outcomes. Let’s measure MC/DC
and confirm:
GCC 15.1 was released
today, and
it comes with prime path coverage support! Try it out and build your
programs with -fpath-coverage
, it truly is a brilliant metric.
I wrote another paper detailing the implementation of the prime path coverage support. You can get a copy here or from arxiv.