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

Generated by: LCOV version 1.16