[Skiboot] Increasing skiboot unit test code coverage

Stewart Smith stewart at linux.vnet.ibm.com
Wed Jan 21 14:44:31 AEDT 2015

Hi all,

We have roughly 54,500 LOC in Skiboot and an additional ~4000 LOC of
unit tests.

I've been producing lcov code coverage reports since October last

Here's the history of code coverage for unit tests for skiboot:

Date          Lines        Functions    Branches
              (hit/total)  (hit/total)  (hit/total)
2014-10-22    939  / 1488   106 / 148   406 / 867
2014-11-22    1196 / 1811   130 / 176   475 / 991
2014-12-22    1361 / 1977   153 / 200   515 / 1041
2015-01-21    1532 / 2363   166 / 235   612 / 1350

In 3 months we've increased by 50% the number of lines of code,
functions and branches being hit in unit tests.

Today, I pushed some code to add in skeletons for more of libc unit
tests, which is why we have a larger gap between hit and total LOC than
we did at the start.

What we need to do is close the following gaps:
- untested code paths in code currently included in unit tests
- code that could be unit tested but isn't

The bigger task is to get gcov support for skiboot so that we can boot a
system and get coverage data out of it. That can be done in parallel

I'm not sure what prizes I should give out for contributing
tests.... but I'm sure it's something awesome!

More information about the Skiboot mailing list