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 30365-beea1ff998) Lines: 688 719 95.7 %
Date: 2025-07-01 09:21:48 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 200496
muluui 222718
convi 438672
divis 1006038
pari_gmp_free 1755950
setloop 2997878
truncr 3625179
sqrtremi 5182309
xmpn_copy 6890087
floorr 7129823
red_montgomery 34944635
divri_with_gmp 35250567
remi2n 39052784
diviuexact 39415959
icopy_ef 41256378
sqrispec_mirror 41410076
mpz2GEN 57695062
divrr_with_gmp 76129490
muliispec_mirror 85187139
divis_rem 86174758
incpos 103276343
incloop 103677842
absdiviu_rem 110780051
GEN2mpz 115387756
sqrtr_abs 126383939
mantissa2nr 138184043
divrr 142753561
divri 151394749
xmpn_zero 237488159
equaliispec 269581924
int_normalize 308776390
affir 403728298
diviuexact_i 420962611
roundr_up_ip 527211054
diviiexact 533599355
xmpn_mirror 587163097
shiftispec 714627016
xmpn_mirrorcopy 718681539
adduispec_offset 766958890
sqrispec 1026423557
umodiu 1316254554
subiuspec 1777286595
dvmdii 2196813736
adduispec 2790867419
subiispec 3019266990
addiispec 3334947238
cmpiispec 3973424941
muluispec 5617986939
muliispec 5954258086

Generated by: LCOV version 1.16