Code coverage tests

This page documents the degree to which the PARI/GP source code is tested by our public test suite, distributed with the source distribution in directory src/test/. This is measured by the gcov utility; we then process gcov output using the lcov frond-end.

We test a few variants depending on Configure flags on the pari.math.u-bordeaux.fr machine (x86_64 architecture), and agregate them in the final report:

The target is to exceed 90% coverage for all mathematical modules (given that branches depending on DEBUGLEVEL or DEBUGMEM are not covered). This script is run to produce the results below.

LCOV - code coverage report
Current view: top level - kernel/none Hit Total Coverage
Test: PARI/GP v2.18.0 lcov report (development 29818-b3e15d99d2) Lines: 3538 3788 93.4 %
Date: 2024-12-27 09:09:37 Functions: 417 485 86.0 %
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 %

Filename Sort by name Line Coverage Sort by line coverage Functions Sort by function coverage
level1.h
79.1%79.1%
79.1 % 605 / 765 76.8 % 219 / 285
ratlift.c
90.7%90.7%
90.7 % 98 / 108 100.0 % 3 / 3
mp_indep.c
94.4%94.4%
94.4 % 540 / 572 98.1 % 52 / 53
mp.c
96.7%96.7%
96.7 % 1115 / 1153 98.6 % 69 / 70
gcdext.c
97.6%97.6%
97.6 % 122 / 125 100.0 % 4 / 4
halfgcd.c
98.2%98.2%
98.2 % 215 / 219 100.0 % 20 / 20
cmp.c
98.6%98.6%
98.6 % 70 / 71 100.0 % 7 / 7
gcdll.c
99.4%99.4%
99.4 % 338 / 340 100.0 % 14 / 14
bfffo.h
100.0%
100.0 % 8 / 8 100.0 % 1 / 1
addll.h
100.0%
100.0 % 16 / 16 100.0 % 4 / 4
mulll.h
100.0%
100.0 % 25 / 25 100.0 % 2 / 2
divll.h
100.0%
100.0 % 34 / 34 100.0 % 1 / 1
divll_pre.h
100.0%
100.0 % 48 / 48 100.0 % 5 / 5
invmod.c
100.0%
100.0 % 51 / 51 100.0 % 2 / 2
gcd.c
100.0%
100.0 % 66 / 66 100.0 % 4 / 4
add.c
100.0%
100.0 % 187 / 187 100.0 % 10 / 10

Generated by: LCOV version 1.16