What's new in zcov - March 2026

What's new in zcov - March 2026

March 23, 2026

Graph improvements

I wanted zcov to quickly and naturally show the coverage status of a piece of code. Most of the time we’re interested in missing coverage as that is where we need to do work, either adding a test, improving the spec, or figuring out if there is a mismatch between the code as-is and then goals we’re trying to achieve. zcov can now colour code the blocks to show this, using a common red/yellow/green system. This works quite well; the red blocks immediately stand out. In fact, differently coloured blocks stand out, so if a function is mostly covered, missing coverage stands out, and vice versa.

It comes with two modes, block and edge. The block mode is the most basic one - is the block visited or not, a direct improvement of the traditional line coverage red/green highlight. Here’s an example from GNU coreutils:

Block colouring mode

The edge mode is slightly more sophisticated and will colour blocks green when all outgoing edges are taken, yellow when some are taken, and red when none are taken. This is the same function as before, but in edge mode, which colours block 2 yellow.

Edge colouring mode

What’s missing is a way to neatly show which edges are covered and which are missing. I tried colouring the edges using the same colour schema, but they actually became a lot harder to read that way.

Colouring for MC/DC is not yet implemented, but shouldn’t be too far off. The colours used for missing/covered/partial will be configurable, too, both to mesh well with colour schemes, and to improve accessibility (colour blindness)

I have also added labels to edges of conditions so it’s easy to tell which edge (and outcome) is the true and false one. This makes it a lot easier to understand the graph as the distance between the code in blocks makes it a lot harder to recognize which successor is the then and else.

Sequence numbers in prime paths

zcov has been able to highlight a single path for a long time by making the block borders and edges thicker, but it was very difficult to actually see where paths began, especially in tight loops. A prime path is a sequence of blocks, not simply a collection of blocks. Recently zcov will paint the sequence number in the block header when the path is selected. This is a necessity when interrogating paths in loops, as it would otherwise be impossible to tell which of the rotated paths we’re looking at. Here are two examples of a rotated path in the or function in GNU coreutils; the first path goes from block 4 through 4, the other from block 5 through 5.

Path 4..4 Path 5..5

The list itself has been simplified to show the path number and the first .. last block. The actual sequence is hard to read out of a list, and sequences can be very long, and long sequences are easy to understand in graph form.

Control panel for the function/graph view

There is a new info- and control panel for the function/graph view. This new panel makes it easy to get an overview of which function we’re looking at, presenting its name (both mangled and demangled), the source file it is located in, the coverage as nice progress bars, and a control for selecting paths for highlighting.

fchmod_or_lchmod example

By default the uncovered prime paths will be shown as they are the most likely to be interesting. When working towards coverage, this will be the shrinking set, and could even function as a todo list. Two more path filters are currently supported, covered and all, as seen in this picture. Prime path filtering

Function filtering

The function list was one of the first features I added to zcov, and I have added a filter-and-search box to it. As shown here it uses a regular expression search/filter to only show functions matching a pattern. This is a requirement for large projects. As a data point, GNU coreutils has more than 2500 functions, and it’s not really all that large. Function filtering

Closing remarks

These features were made possible by an overhaul and, for the most part, a simplification of the zcov internals. The core engine is a lot more capable now than just a few months ago, and improving still. I plan to quite a few more features and polish over the coming months.

I have also updated the software page with the new screenshots.