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 30580-ef5a862e7f) Lines: 683 719 95.0 %
Date: 2025-12-19 09:23:05 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 200465
muluui 222694
divis 325552
convi 439728
pari_gmp_free 1752285
setloop 2999294
truncr 3437393
sqrtremi 5162633
xmpn_copy 6934671
floorr 6939828
diviuexact 31848920
divri_with_gmp 35252491
red_montgomery 35431532
remi2n 39218125
sqrispec_mirror 40096400
icopy_ef 41495232
absdiviu_rem 51103694
mpz2GEN 57804961
divrr_with_gmp 76237997
muliispec_mirror 83297549
divis_rem 86349577
incpos 103333492
incloop 103741165
GEN2mpz 115607303
sqrtr_abs 126395468
mantissa2nr 138417673
divrr 142533805
divri 151542676
xmpn_zero 237620682
equaliispec 268880841
int_normalize 308719895
affir 404437988
diviuexact_i 414511211
roundr_up_ip 518707012
diviiexact 535355486
xmpn_mirror 584713331
xmpn_mirrorcopy 714174683
shiftispec 721094171
adduispec_offset 764622836
sqrispec 1031634253
umodiu 1330293318
subiuspec 1781093173
dvmdii 2199585446
adduispec 2790140857
subiispec 3027031657
addiispec 3340418102
cmpiispec 3985811118
muluispec 5608654386
muliispec 5848166896

Generated by: LCOV version 1.16