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 30209-fa4743ed68) Lines: 1115 1153 96.7 %
Date: 2025-04-25 09:18:24 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 786
pari_kernel_init 788
sqrispec_fft 1659
incneg 50013
muliispec_fft 83631
muliifft_unspliti 85290
mulliifft_params 85290
resetloop 130656
diviuuexact 149898
muluui 166566
muliifft_spliti 168921
sqrtispec2_sh 274824
convi 316977
Zf_sqr 448896
divis 721647
convi_dac 736128
setloop 2247123
truncr 2621976
sqrtispec1_sh 2702040
sqrtremi 3763377
floorr 5246184
Zf_mul 15338496
muliifft_dis 15702102
remi2n 19702620
diviuexact 28475832
diviuexact_i 29512011
muliifft_dit 30956967
incpos 34954578
incloop 35257062
red_montgomery 36737337
mantissa2nr 48717927
divis_rem 65060421
sqrtr_abs 90924087
xmpn_zero 90924087
sqrtispec2 91710045
p_sqrtu2 91984869
p_sqrtu1 94686909
divri 113500701
divrr 129483894
Zf_add 187658496
Zf_mulsqrt2 187658496
Zf_sub 191070978
equaliispec 198553023
Zf_shift 206264028
absdiviu_rem 278803776
affir 320520660
sqrtispec 325921131
diviiexact 390647487
Zf_red_destroy 399271983
roundr_up_ip 444313438
catii 468422172
adduispec_offset 491858088
addshiftw 704270088
int_normalize 851290215
sqrispec_basecase 928109532
sqrispec 938048607
xmpn_copy 1068379998
shiftispec 1275305508
umodiu 1407618171
subiuspec 1587841260
dvmdii 1671290703
adduispec 2389344480
subiispec 3382601544
cmpiispec 4098691380
addiispec 4572316152
muluispec 4808844696
muliispec_basecase 5199086781
muliispec 5426011737

Generated by: LCOV version 1.16