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 - mp_indep.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30316-0578a48613) Lines: 535 567 94.4 %
Date: 2025-06-01 09:19:36 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
dblmantissa 0
divsi 175
divsr 798
int2um1 8831
div0r 186265
mul0r 473861
sqrs 1499820
divur 2491770
divir 3491956
truedvmdsi 6202031
divrs 9823220
dbltor 13362863
int2u 25561859
dblexpo 26351963
mantissa_real 52689530
mulrrz_int 55648794
invmod2BIL 60535328
invr_basecase 62464080
invr 62464322
trunc2nr 62647597
addmulii_gen 90711617
int2n 105930279
mulsr 117456961
truedvmdis 129155083
truedvmdii 132298434
addmulii 167032078
mulss 201149379
usqrt 228702400
rtodbl 288520081
addmulii_lg3 467028750
sqrz_i 559418642
sqrr 592101591
mulsi 603873245
sqru 614346891
mulrrz_3 652083647
mulur_2 703102484
mulrrz_3end 772342243
mulur 920040154
mului 934567935
mulir 978752596
divru 1106583064
affrr 1370426138
addmulii_inplace 1568297798
sqri 1888262989
vals 2218513216
shifti 2238661578
modii 3061416921
mulrrz_end 3569480022
mulrrz_i 3717729858
mulrr 3962304326
muluu 4548768908
mulii 21014676621

Generated by: LCOV version 1.16