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 29712-7c8a932571) Lines: 1115 1153 96.7 %
Date: 2024-11-15 09:08:45 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 768
pari_kernel_init 770
sqrispec_fft 1659
incneg 49989
muliispec_fft 83268
muliifft_unspliti 84927
mulliifft_params 84927
resetloop 130656
diviuuexact 149130
muluui 165798
muliifft_spliti 168195
sqrtispec2_sh 272964
convi 315530
Zf_sqr 448896
divis 722523
convi_dac 733332
setloop 2246988
truncr 2612772
sqrtispec1_sh 2713710
sqrtremi 3763968
floorr 5227929
Zf_mul 15250944
muliifft_dis 15614913
remi2n 18450993
diviuexact 22473924
diviuexact_i 29412579
muliifft_dit 30782589
incpos 31950762
incloop 32253210
red_montgomery 39035385
mantissa2nr 48670173
divis_rem 64986099
sqrtr_abs 90735717
xmpn_zero 90735717
sqrtispec2 91512456
p_sqrtu2 91785420
p_sqrtu1 94499130
divri 113232426
divrr 129171249
Zf_add 186567552
Zf_mulsqrt2 186567552
Zf_sub 189937092
equaliispec 203041074
Zf_shift 205004526
absdiviu_rem 274342011
affir 319780443
sqrtispec 325167528
adduispec_offset 353273658
diviiexact 369436503
Zf_red_destroy 396836211
roundr_up_ip 442588327
catii 467310144
addshiftw 649787142
int_normalize 845856066
sqrispec_basecase 900683901
sqrispec 907996815
xmpn_copy 1065887130
shiftispec 1267969854
umodiu 1403263227
dvmdii 1474049394
subiuspec 1542308502
adduispec 2247559299
subiispec 3304839474
cmpiispec 3995067861
addiispec 4392363501
muluispec 4714475907
muliispec_basecase 5070679749
muliispec 5273254203

Generated by: LCOV version 1.16