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 30145-32f0acf4da) Lines: 688 719 95.7 %
Date: 2025-04-18 09:18:41 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 200507
muluui 222741
convi 438474
divis 966294
pari_gmp_free 1759233
setloop 2997597
truncr 3545597
sqrtremi 5114437
xmpn_copy 6706533
floorr 7002153
red_montgomery 33645849
divri_with_gmp 35195176
remi2n 37326875
diviuexact 38827126
icopy_ef 41077810
sqrispec_mirror 41389616
mpz2GEN 57597854
divrr_with_gmp 75703466
muliispec_mirror 84164591
divis_rem 85220507
incpos 103023655
incloop 103431034
absdiviu_rem 109374091
GEN2mpz 115193076
sqrtr_abs 125193535
mantissa2nr 137209203
divrr 141731938
divri 150462563
xmpn_zero 235823137
equaliispec 267171523
int_normalize 306415274
affir 400670601
diviuexact_i 413475152
roundr_up_ip 522004862
diviiexact 525764041
xmpn_mirror 583044712
shiftispec 703230905
xmpn_mirrorcopy 712817902
adduispec_offset 765779536
sqrispec 1018835082
umodiu 1305407532
subiuspec 1767184188
dvmdii 2177260155
adduispec 2776778206
subiispec 2999499247
addiispec 3312379128
cmpiispec 3940727721
muluispec 5547830571
muliispec 5881588358

Generated by: LCOV version 1.16