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 29451-c474da952c) Lines: 1115 1153 96.7 %
Date: 2024-07-16 09:03:37 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 271620
convi 308660
Zf_sqr 448896
divis 720507
convi_dac 734235
setloop 2246652
truncr 2590494
sqrtispec1_sh 2707308
sqrtremi 3755271
floorr 5214747
Zf_mul 15237120
muliifft_dis 15601146
remi2n 18694242
diviuexact 22212936
diviuexact_i 28978512
muliifft_dit 30755055
incpos 31948608
incloop 32250972
red_montgomery 39674454
mantissa2nr 48780324
divis_rem 64080264
sqrtr_abs 90743958
xmpn_zero 90743958
sqrtispec2 91519746
p_sqrtu2 91791366
p_sqrtu1 94498674
divri 113724402
divrr 128273541
Zf_add 186394752
Zf_mulsqrt2 186394752
Zf_sub 189757548
equaliispec 200950026
Zf_shift 204805143
absdiviu_rem 271879443
affir 317752731
sqrtispec 325358385
adduispec_offset 349292886
diviiexact 351726294
Zf_red_destroy 396451020
roundr_up_ip 443030530
catii 467677278
addshiftw 643940736
int_normalize 842982801
sqrispec_basecase 899872020
sqrispec 907185324
xmpn_copy 1066659651
shiftispec 1258922310
umodiu 1294969332
dvmdii 1450975014
subiuspec 1497080052
adduispec 2194701645
subiispec 3239708061
cmpiispec 3920153283
addiispec 4302815313
muluispec 4629668463
muliispec_basecase 4988283054
muliispec 5187783177

Generated by: LCOV version 1.16