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.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30387-12623f1693) Lines: 1115 1153 96.7 %
Date: 2025-07-11 09:22:46 Functions: 69 70 98.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addumului 0
pari_kernel_version 2
pari_kernel_close 786
pari_kernel_init 788
sqrispec_fft 1659
incneg 50013
muliispec_fft 83694
muliifft_unspliti 85353
mulliifft_params 85353
resetloop 130656
diviuuexact 149898
muluui 166566
muliifft_spliti 169047
sqrtispec2_sh 274908
convi 317428
Zf_sqr 448896
convi_dac 736542
divis 751344
setloop 2247348
truncr 2698419
sqrtispec1_sh 2751255
sqrtremi 3814143
floorr 5347839
Zf_mul 15346560
muliifft_dis 15710103
remi2n 19992291
diviuexact 28712127
diviuexact_i 29566749
muliifft_dit 30972969
incpos 34958988
incloop 35261487
red_montgomery 40596525
mantissa2nr 49099899
divis_rem 65790327
sqrtr_abs 91796415
xmpn_zero 91796415
sqrtispec2 92583840
p_sqrtu2 92858748
p_sqrtu1 95610003
divri 114207165
divrr 130299918
Zf_add 187743168
Zf_mulsqrt2 187743168
Zf_sub 191155632
equaliispec 200339307
Zf_shift 206356761
absdiviu_rem 280532988
affir 322951125
sqrtispec 329505741
diviiexact 395183286
Zf_red_destroy 399451479
roundr_up_ip 448883869
catii 473843802
adduispec_offset 491214021
addshiftw 707471634
int_normalize 856561476
sqrispec_basecase 939091170
sqrispec 949030260
xmpn_copy 1080640383
shiftispec 1284981003
umodiu 1428685200
subiuspec 1593689484
dvmdii 1685320134
adduispec 2396052852
subiispec 3397035699
cmpiispec 4127400966
addiispec 4588090497
muluispec 4853644419
muliispec_basecase 5242157784
muliispec 5469329289

Generated by: LCOV version 1.16