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 30371-bd27ad7662) Lines: 535 567 94.4 %
Date: 2025-07-06 09:22:54 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 187460
mul0r 482280
sqrs 1541724
divur 2500516
divir 3501407
truedvmdsi 6202031
divrs 9961833
dbltor 13374385
int2u 25997596
dblexpo 26511613
mantissa_real 53498562
mulrrz_int 55660619
invmod2BIL 60666774
trunc2nr 62686696
invr_basecase 63111443
invr 63111797
addmulii_gen 90726180
int2n 106860230
mulsr 118190947
truedvmdis 130834236
truedvmdii 133914835
addmulii 168634097
mulss 201176821
usqrt 230240751
rtodbl 290120853
addmulii_lg3 472289699
sqrz_i 561158104
sqrr 594142352
mulsi 604811862
sqru 617959603
mulrrz_3 654809752
mulur_2 705931587
mulrrz_3end 775199217
mulur 927458326
mului 945725732
mulir 986293558
divru 1113363718
affrr 1379278128
addmulii_inplace 1575386741
sqri 1900353582
vals 2254039150
shifti 2257577491
modii 3083535896
mulrrz_end 3598786614
mulrrz_i 3746737139
mulrr 3995649091
muluu 4580203583
mulii 21120346637

Generated by: LCOV version 1.16