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 30532-0c728fd268) Lines: 683 719 95.0 %
Date: 2025-10-22 09:22:36 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 200476
muluui 222687
divis 325430
convi 439469
pari_gmp_free 1755952
setloop 2999286
truncr 3650028
sqrtremi 5162002
xmpn_copy 6897269
floorr 7140453
diviuexact 31842129
red_montgomery 35010398
divri_with_gmp 35248895
remi2n 39086098
icopy_ef 41490082
sqrispec_mirror 41492156
absdiviu_rem 50862435
mpz2GEN 57768419
divrr_with_gmp 76400916
muliispec_mirror 85157608
divis_rem 86237043
incpos 103222897
incloop 103628208
GEN2mpz 115534354
sqrtr_abs 126695487
mantissa2nr 138484092
divrr 142864199
divri 151448664
xmpn_zero 238078277
equaliispec 268843665
int_normalize 306612914
affir 404082048
diviuexact_i 413288090
roundr_up_ip 527363171
diviiexact 533978896
xmpn_mirror 587810845
xmpn_mirrorcopy 720041389
shiftispec 720266746
adduispec_offset 764448422
sqrispec 1031738229
umodiu 1329862045
subiuspec 1778895598
dvmdii 2196644100
adduispec 2789706329
subiispec 3022906646
addiispec 3336919981
cmpiispec 3980098603
muluispec 5601685561
muliispec 5843209400

Generated by: LCOV version 1.16