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 30561-4f4869c0e7) Lines: 683 719 95.0 %
Date: 2025-11-28 09:21:39 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 200469
muluui 222698
divis 325426
convi 439745
pari_gmp_free 1755955
setloop 2999295
truncr 3460160
sqrtremi 5162263
xmpn_copy 6897299
floorr 6947554
diviuexact 31839335
red_montgomery 34965095
divri_with_gmp 35250672
remi2n 39031687
sqrispec_mirror 40049116
icopy_ef 41492941
absdiviu_rem 51000153
mpz2GEN 57762935
divrr_with_gmp 76240284
muliispec_mirror 83347071
divis_rem 86236345
incpos 103308859
incloop 103709338
GEN2mpz 115523644
sqrtr_abs 126368138
mantissa2nr 138314824
divrr 142528952
divri 151466336
xmpn_zero 237577766
equaliispec 268861927
int_normalize 306777217
affir 404217985
diviuexact_i 413433729
roundr_up_ip 518584420
diviiexact 534113443
xmpn_mirror 584486327
xmpn_mirrorcopy 713865973
shiftispec 720414521
adduispec_offset 764773937
sqrispec 1030986420
umodiu 1327420102
subiuspec 1779271406
dvmdii 2196905017
adduispec 2788577948
subiispec 3024452705
addiispec 3337711742
cmpiispec 3981650648
muluispec 5603880795
muliispec 5843246848

Generated by: LCOV version 1.16