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 29950-285c5b69ed) Lines: 1115 1153 96.7 %
Date: 2025-02-05 09:09:51 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 774
pari_kernel_init 776
sqrispec_fft 1659
incneg 49989
muliispec_fft 83409
muliifft_unspliti 85068
mulliifft_params 85068
resetloop 130656
diviuuexact 149130
muluui 165798
muliifft_spliti 168477
sqrtispec2_sh 275019
convi 316082
Zf_sqr 448896
divis 721875
convi_dac 733755
setloop 2247009
truncr 2613402
sqrtispec1_sh 2699901
sqrtremi 3762000
floorr 5229291
Zf_mul 15283584
muliifft_dis 15647412
remi2n 18481461
diviuexact 22168578
diviuexact_i 29505669
muliifft_dit 30847587
incpos 31953747
incloop 32256207
red_montgomery 39035064
mantissa2nr 48682632
divis_rem 65013774
sqrtr_abs 90875553
xmpn_zero 90875553
sqrtispec2 91662078
p_sqrtu2 91937097
p_sqrtu1 94636998
divri 113278173
divrr 129486828
Zf_add 186970176
Zf_mulsqrt2 186970176
Zf_sub 190355244
equaliispec 197603142
Zf_shift 205469481
absdiviu_rem 270981264
affir 320284074
sqrtispec 325785723
adduispec_offset 352304865
diviiexact 375887094
Zf_red_destroy 397737516
roundr_up_ip 443537329
catii 468247290
addshiftw 651758832
int_normalize 847324248
sqrispec_basecase 899948871
sqrispec 907287753
xmpn_copy 1067944173
shiftispec 1273554378
umodiu 1409991843
dvmdii 1472674275
subiuspec 1542054102
adduispec 2252866080
subiispec 3308220492
cmpiispec 4007219409
addiispec 4403515236
muluispec 4727726823
muliispec_basecase 5074996047
muliispec 5278309281

Generated by: LCOV version 1.16