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 29420-55f63b8cfe) Lines: 1115 1153 96.7 %
Date: 2024-07-03 09:03:24 Functions: 69 70 98.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Zf_add 186394752
Zf_mul 15237120
Zf_mulsqrt2 186394752
Zf_red_destroy 396451020
Zf_shift 204805143
Zf_sqr 448896
Zf_sub 189757548
absdiviu_rem 271878963
addiispec 4303071801
addshiftw 643941774
adduispec 2194711698
adduispec_offset 349292886
addumului 0
affir 317752707
catii 467679354
cmpiispec 3920508114
convi 308652
convi_dac 734235
diviiexact 351732867
divis 720507
divis_rem 64081419
diviuexact 22212651
diviuexact_i 28978572
diviuuexact 149130
divri 113724402
divrr 128273550
dvmdii 1450968861
equaliispec 200950656
floorr 5214747
incloop 32250972
incneg 49989
incpos 31948608
int_normalize 842984877
mantissa2nr 48780321
muliifft_dis 15601146
muliifft_dit 30755055
muliifft_spliti 168081
muliifft_unspliti 84870
muliispec 5188426734
muliispec_basecase 4988926611
muliispec_fft 83211
mulliifft_params 84870
muluispec 4630158075
muluui 165798
p_sqrtu1 94498956
p_sqrtu2 91791717
pari_kernel_close 765
pari_kernel_init 767
pari_kernel_version 2
red_montgomery 39674454
remi2n 18694185
resetloop 130656
roundr_up_ip 443030782
setloop 2246652
shiftispec 1258922517
sqrispec 907187064
sqrispec_basecase 899873760
sqrispec_fft 1659
sqrtispec 325359798
sqrtispec1_sh 2707239
sqrtispec2 91520121
sqrtispec2_sh 271596
sqrtr_abs 90744390
sqrtremi 3755121
subiispec 3240043947
subiuspec 1497102813
truncr 2590494
umodiu 1294934868
xmpn_copy 1066664448
xmpn_zero 90744390

Generated by: LCOV version 1.16