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.2 lcov report (development 29419-8afb0ed749) Lines: 1115 1153 96.7 %
Date: 2024-07-02 09:03:41 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 765
pari_kernel_init 767
sqrispec_fft 1659
incneg 49989
muliispec_fft 83211
muliifft_unspliti 84870
mulliifft_params 84870
resetloop 130656
diviuuexact 149130
muluui 165798
muliifft_spliti 168081
sqrtispec2_sh 271596
convi 308652
Zf_sqr 448896
divis 720507
convi_dac 734235
setloop 2246652
truncr 2590494
sqrtispec1_sh 2707239
sqrtremi 3755121
floorr 5214747
Zf_mul 15237120
muliifft_dis 15601146
remi2n 18694185
diviuexact 22212651
diviuexact_i 28978572
muliifft_dit 30755055
incpos 31948608
incloop 32250972
red_montgomery 39674454
mantissa2nr 48780321
divis_rem 64081419
sqrtr_abs 90744390
xmpn_zero 90744390
sqrtispec2 91520121
p_sqrtu2 91791717
p_sqrtu1 94498956
divri 113724402
divrr 128273550
Zf_add 186394752
Zf_mulsqrt2 186394752
Zf_sub 189757548
equaliispec 200950656
Zf_shift 204805143
absdiviu_rem 271878963
affir 317752707
sqrtispec 325359798
adduispec_offset 349292886
diviiexact 351732867
Zf_red_destroy 396451020
roundr_up_ip 443030782
catii 467679354
addshiftw 643941774
int_normalize 842984877
sqrispec_basecase 899873760
sqrispec 907187064
xmpn_copy 1066664448
shiftispec 1258922517
umodiu 1294934868
dvmdii 1450968861
subiuspec 1497102813
adduispec 2194711698
subiispec 3240043947
cmpiispec 3920508114
addiispec 4303071801
muluispec 4630158075
muliispec_basecase 4988926611
muliispec 5188426734

Generated by: LCOV version 1.16