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.16.1 lcov report (development 28676-df828f1c94) Lines: 1114 1153 96.6 %
Date: 2023-08-26 07:54:43 Functions: 69 70 98.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Zf_add 182144640
Zf_mul 14929920
Zf_mulsqrt2 182144640
Zf_red_destroy 387560190
Zf_shift 200217993
Zf_sqr 395904
Zf_sub 185396103
absdiviu_rem 158188041
addiispec 4353582063
addshiftw 597134595
adduispec 2157767097
adduispec_offset 344526237
addumului 0
affir 305083044
catii 409775076
cmpiispec 3916773531
convi 305115
convi_dac 724644
diviiexact 363691824
divis 710889
divis_rem 58865385
diviuexact 20901327
diviuexact_i 41512146
diviuuexact 148215
divri 105124452
divrr 104865306
dvmdii 1315352301
equaliispec 187379520
floorr 2653635
incloop 32194110
incneg 25989
incpos 31916661
int_normalize 776654586
mantissa2nr 32984217
muliifft_dis 15242553
muliifft_dit 30090648
muliifft_spliti 165096
muliifft_unspliti 83271
muliispec 4624357962
muliispec_basecase 4433679522
muliispec_fft 81825
mulliifft_params 83271
muluispec 4220788986
muluui 164883
p_sqrtu1 75043458
p_sqrtu2 73199706
pari_kernel_close 747
pari_kernel_init 749
pari_kernel_version 2
red_montgomery 35697213
remi2n 13425237
resetloop 130656
roundr_up_ip 352417564
setloop 2239581
shiftispec 1155847986
sqrispec 859633443
sqrispec_basecase 852623886
sqrispec_fft 1446
sqrtispec 277181925
sqrtispec1_sh 1843752
sqrtispec2 72294387
sqrtispec2_sh 905319
sqrtr_abs 71713962
sqrtremi 3330051
subiispec 3371377158
subiuspec 1504866267
truncr 2582331
umodiu 1269671085
xmpn_copy 925353123
xmpn_zero 71713962

Generated by: LCOV version 1.14