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/none - mp.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30851-7844d7b3a5) Lines: 1115 1153 96.7 %
Date: 2026-05-02 09:26:58 Functions: 69 70 98.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addumului 0
pari_kernel_version 2
pari_kernel_close 795
pari_kernel_init 797
sqrispec_fft 1704
incneg 50013
muliispec_fft 83910
muliifft_unspliti 85614
mulliifft_params 85614
resetloop 130695
diviuuexact 150129
muluui 166797
muliifft_spliti 169524
divis 245313
sqrtispec2_sh 271365
convi 319661
Zf_sqr 456960
convi_dac 739083
setloop 2248413
truncr 2544993
sqrtispec1_sh 2711985
sqrtremi 3769977
floorr 5201928
Zf_mul 15406080
muliifft_dis 15777426
remi2n 20286105
diviuexact 22349790
diviuexact_i 29686461
muliifft_dit 31099596
incpos 34964970
incloop 35267469
red_montgomery 36219024
mantissa2nr 49459701
divis_rem 65910336
sqrtr_abs 94858677
xmpn_zero 94858677
sqrtispec2 95644749
p_sqrtu2 95916114
p_sqrtu1 98628099
divri 115013781
divrr 136168140
Zf_add 188555904
Zf_mulsqrt2 188555904
Zf_sub 191999844
Zf_shift 207298173
equaliispec 228561387
absdiviu_rem 234903690
affir 324835779
sqrtispec 338051700
diviiexact 389833227
Zf_red_destroy 401280648
roundr_up_ip 449792449
catii 484813902
adduispec_offset 492296220
addshiftw 715869699
int_normalize 868933683
sqrispec_basecase 995495277
sqrispec 1005486765
xmpn_copy 1106981007
shiftispec 1291486470
umodiu 1430597421
subiuspec 1595538114
dvmdii 1689015246
adduispec 2393617161
subiispec 3408688362
cmpiispec 4131693618
addiispec 4592830233
muluispec 4841202792
muliispec_basecase 5155491942
muliispec 5384087367

Generated by: LCOV version 1.16