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 30587-f85873d515) Lines: 683 719 95.0 %
Date: 2025-12-28 09:21:53 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 200478
muluui 222716
divis 323942
convi 439779
pari_gmp_free 1735801
setloop 2999295
truncr 3457952
sqrtremi 5159953
xmpn_copy 6832530
floorr 6947097
diviuexact 31784364
red_montgomery 34366692
divri_with_gmp 35250889
remi2n 37769703
sqrispec_mirror 40110530
icopy_ef 41496294
absdiviu_rem 51088485
mpz2GEN 57807843
divrr_with_gmp 76252399
muliispec_mirror 83293665
divis_rem 86359944
incpos 103515396
incloop 103921816
GEN2mpz 115613474
sqrtr_abs 126389074
mantissa2nr 138414185
divrr 142556903
divri 151539623
xmpn_zero 237640681
equaliispec 268814218
int_normalize 309149107
affir 404468879
diviuexact_i 413105821
roundr_up_ip 518710514
diviiexact 534037164
xmpn_mirror 584941250
shiftispec 713623236
xmpn_mirrorcopy 714348893
adduispec_offset 764797478
sqrispec 1024879427
umodiu 1332293546
subiuspec 1780231630
dvmdii 2193129783
adduispec 2791894111
subiispec 3019509918
addiispec 3334725623
cmpiispec 3976247460
muluispec 5606537145
muliispec 5838993456

Generated by: LCOV version 1.16