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/gmp - mp.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30347-cb65b7994e) Lines: 683 719 95.0 %
Date: 2025-06-27 09:22:08 Functions: 54 56 96.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addumului 0
pari_gmp_realloc 0
pari_kernel_version 4
pari_kernel_close 1104
pari_kernel_init 1112
incneg 66684
resetloop 174328
diviuuexact 200459
muluui 222698
convi 438618
divis 976967
pari_gmp_free 1755938
setloop 2997877
truncr 3650446
sqrtremi 5164470
xmpn_copy 6887522
floorr 7136214
red_montgomery 35061796
divri_with_gmp 35238634
remi2n 38987241
diviuexact 39358404
icopy_ef 41203785
sqrispec_mirror 41404811
mpz2GEN 57616429
divrr_with_gmp 76050504
muliispec_mirror 85047497
divis_rem 86216168
incpos 103205365
incloop 103612509
absdiviu_rem 110622139
GEN2mpz 115230219
sqrtr_abs 126357446
mantissa2nr 138186590
divrr 142450659
divri 151204200
xmpn_zero 237415015
equaliispec 269117784
int_normalize 308636752
affir 403553332
diviuexact_i 419864903
roundr_up_ip 527088321
diviiexact 532484594
xmpn_mirror 586946597
shiftispec 714192737
xmpn_mirrorcopy 718404762
adduispec_offset 765903906
sqrispec 1024237024
umodiu 1314957087
subiuspec 1775695214
dvmdii 2192584781
adduispec 2787422335
subiispec 3014429755
addiispec 3330439647
cmpiispec 3966747941
muluispec 5606809120
muliispec 5945993917

Generated by: LCOV version 1.16