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 30316-0578a48613) Lines: 683 719 95.0 %
Date: 2025-06-01 09:19:36 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 200466
muluui 222727
convi 438568
divis 966680
pari_gmp_free 1744697
setloop 2997600
truncr 3543029
sqrtremi 5114988
xmpn_copy 6698410
floorr 7001185
red_montgomery 34859746
divri_with_gmp 35238366
remi2n 37446141
diviuexact 39180108
icopy_ef 41189236
sqrispec_mirror 41404841
mpz2GEN 57558539
divrr_with_gmp 75810303
muliispec_mirror 85113173
divis_rem 85237890
incpos 103420674
incloop 103826681
absdiviu_rem 109911797
GEN2mpz 115114427
sqrtr_abs 125657469
mantissa2nr 137404123
divrr 141856118
divri 151127201
xmpn_zero 236421483
equaliispec 267241042
int_normalize 306460987
affir 401195621
diviuexact_i 414009102
roundr_up_ip 524541803
diviiexact 525910425
xmpn_mirror 584652127
shiftispec 704225311
xmpn_mirrorcopy 716002574
adduispec_offset 765159596
sqrispec 1019814555
umodiu 1304848820
subiuspec 1767844161
dvmdii 2177803549
adduispec 2779960490
subiispec 3003335727
addiispec 3321034387
cmpiispec 3942595199
muluispec 5582790062
muliispec 5920890375

Generated by: LCOV version 1.16