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

Generated by: LCOV version 1.16