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.0 lcov report (development 29806-4d001396c7) Lines: 1115 1153 96.7 %
Date: 2024-12-21 09:08:57 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 83358
muliifft_unspliti 85017
mulliifft_params 85017
resetloop 130656
diviuuexact 149130
muluui 165798
muliifft_spliti 168375
sqrtispec2_sh 272964
convi 315885
Zf_sqr 448896
divis 722529
convi_dac 733725
setloop 2247000
truncr 2612814
sqrtispec1_sh 2713782
sqrtremi 3764040
floorr 5227971
Zf_mul 15275520
muliifft_dis 15639399
remi2n 18451053
diviuexact 22482027
diviuexact_i 29433594
muliifft_dit 30831561
incpos 31950762
incloop 32253222
red_montgomery 39029946
mantissa2nr 48670071
divis_rem 64986648
sqrtr_abs 90887109
xmpn_zero 90887109
sqrtispec2 91663848
p_sqrtu2 91936812
p_sqrtu1 94650594
divri 113276781
divrr 129350880
Zf_add 186880896
Zf_mulsqrt2 186880896
Zf_sub 190263924
equaliispec 203015874
Zf_shift 205368684
absdiviu_rem 274375905
affir 319716486
sqrtispec 325754817
adduispec_offset 353291856
diviiexact 377000646
Zf_red_destroy 397539939
roundr_up_ip 443444305
catii 468181938
addshiftw 650593227
int_normalize 847179843
sqrispec_basecase 900945150
sqrispec 908256381
xmpn_copy 1067823237
shiftispec 1273352391
umodiu 1406147136
dvmdii 1475383896
subiuspec 1545748590
adduispec 2253890235
subiispec 3308786832
cmpiispec 4007996391
addiispec 4399820751
muluispec 4732536480
muliispec_basecase 5090122518
muliispec 5292883857

Generated by: LCOV version 1.16