Precise, consistent, and reliable code coverage

by Jynn Nelson

Most existing coverage tools are aimed at “good enough” measurements, where percentages are used as a rough estimate, and the change in percentage is used to determine whether a code change hurts or helps total coverage.

For Ferrocene, a safety-certified Rust compiler, rough estimates aren’t enough. In this talk I describe how we made coverage precise enough that we can test in CI the exact source code lines that are covered, applied this to Rust’s core library, and used it to demonstrate to a safety assessor that a subset of core has 100% line coverage, allowing it to be used in safety-critical systems.

Picture of Jynn Nelson

Jynn Nelson

they/she/it
Compiler Team Lead at Ferrous Systems
Links: icon of mastodon icon of github

I enjoy doing evil and deranged things to computers. I think a lot about how to make them more useful and fun, and how to decentralize programs away from large companies that reify power structures in their code. In my spare time, I play piano, visit dog parks, and go hiking in national parks.