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

Generated by: LCOV version 1.16