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 30425-4669acb345) Lines: 683 719 95.0 %
Date: 2025-07-30 09:23:31 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 200489
muluui 222708
convi 438983
divis 1006068
pari_gmp_free 1755952
setloop 2999281
truncr 3650685
sqrtremi 5160794
xmpn_copy 6890079
floorr 7134970
red_montgomery 35035480
divri_with_gmp 35250595
remi2n 39007999
diviuexact 40544848
sqrispec_mirror 41409840
icopy_ef 41479700
mpz2GEN 57738282
divrr_with_gmp 76150927
muliispec_mirror 85022294
divis_rem 86219442
incpos 102607441
incloop 102991909
absdiviu_rem 113209955
GEN2mpz 115474457
sqrtr_abs 126383177
mantissa2nr 138203251
divrr 142777763
divri 151403412
xmpn_zero 237555530
equaliispec 269632485
int_normalize 305953409
affir 403908533
diviuexact_i 422560052
roundr_up_ip 527422171
diviiexact 534540465
xmpn_mirror 587274206
shiftispec 718044663
xmpn_mirrorcopy 718710975
adduispec_offset 764354708
sqrispec 1030855559
umodiu 1328608967
subiuspec 1777494070
dvmdii 2195498837
adduispec 2786156282
subiispec 3020564592
addiispec 3334642313
cmpiispec 3980255428
muluispec 5613237476
muliispec 5943686939

Generated by: LCOV version 1.16