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 30462-6c568f4018) Lines: 683 719 95.0 %
Date: 2025-08-10 09:24: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 200488
muluui 222705
convi 439459
divis 1006211
pari_gmp_free 1755950
setloop 2999290
truncr 3648805
sqrtremi 5160777
xmpn_copy 6895980
floorr 7138994
red_montgomery 34968374
divri_with_gmp 35250874
remi2n 39100909
diviuexact 40544106
sqrispec_mirror 41403949
icopy_ef 41478817
mpz2GEN 57762234
divrr_with_gmp 76345266
muliispec_mirror 85141000
divis_rem 86242413
incpos 103110600
incloop 103517807
absdiviu_rem 113210460
GEN2mpz 115522200
sqrtr_abs 126574736
mantissa2nr 138407909
divrr 142818287
divri 151451287
xmpn_zero 237893284
equaliispec 269630848
int_normalize 306629098
affir 404231710
diviuexact_i 422672075
roundr_up_ip 527113840
diviiexact 534668669
xmpn_mirror 587745790
shiftispec 718041470
xmpn_mirrorcopy 719550951
adduispec_offset 764709023
sqrispec 1031738475
umodiu 1327810500
subiuspec 1778821602
dvmdii 2196342119
adduispec 2787551046
subiispec 3023211468
addiispec 3336758839
cmpiispec 3983459267
muluispec 5615802642
muliispec 5946828317

Generated by: LCOV version 1.16