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 30401-87099e65a6) Lines: 683 719 95.0 %
Date: 2025-07-18 09:23:12 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 200486
muluui 222732
convi 439116
divis 1006059
pari_gmp_free 1755944
setloop 2999283
truncr 3643879
sqrtremi 5182351
xmpn_copy 6889787
floorr 7132341
red_montgomery 35033968
divri_with_gmp 35250529
remi2n 39013095
diviuexact 39579529
icopy_ef 41269122
sqrispec_mirror 41389765
mpz2GEN 57692803
divrr_with_gmp 76147143
muliispec_mirror 85096674
divis_rem 86199354
incpos 103168073
incloop 103576936
absdiviu_rem 110603588
GEN2mpz 115383083
sqrtr_abs 126367967
mantissa2nr 138181635
divrr 142776334
divri 151402719
xmpn_zero 237520580
equaliispec 269623759
int_normalize 306454381
affir 403804476
diviuexact_i 418851679
roundr_up_ip 527632978
diviiexact 531334972
xmpn_mirror 587322521
shiftispec 714872620
xmpn_mirrorcopy 718631610
adduispec_offset 764748039
sqrispec 1028623987
umodiu 1326935387
subiuspec 1773989195
dvmdii 2194993070
adduispec 2784808690
subiispec 3016985691
addiispec 3331205183
cmpiispec 3973357288
muluispec 5603669302
muliispec 5938652727

Generated by: LCOV version 1.16