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 29115-f22e516b23) Lines: 1115 1153 96.7 %
Date: 2024-03-28 08:06:56 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 756
pari_kernel_init 758
sqrispec_fft 1671
incneg 49989
muliispec_fft 83142
muliifft_unspliti 84813
mulliifft_params 84813
resetloop 130656
diviuuexact 149130
muluui 165798
muliifft_spliti 167955
sqrtispec2_sh 271452
convi 305779
Zf_sqr 437760
divis 715209
convi_dac 727611
setloop 2246112
truncr 2466612
sqrtispec1_sh 2704515
sqrtremi 3752733
floorr 3870276
Zf_mul 15209472
muliifft_dis 15562419
remi2n 18713469
diviuexact 21878739
muliifft_dit 30688749
diviuexact_i 31673157
incpos 31947009
incloop 32248878
red_montgomery 39772527
mantissa2nr 48251496
divis_rem 63798765
sqrtr_abs 81959667
xmpn_zero 81959667
sqrtispec2 82735878
p_sqrtu2 83007330
p_sqrtu1 85711845
divri 102470700
divrr 120738519
Zf_add 185837568
Zf_mulsqrt2 185837568
Zf_sub 189180771
equaliispec 194042457
absdiviu_rem 195088803
Zf_shift 204184143
sqrtispec 286958721
affir 308219529
adduispec_offset 348671472
diviiexact 369457770
Zf_red_destroy 395227104
catii 408445686
roundr_up_ip 408446379
addshiftw 617875179
int_normalize 782851779
sqrispec_basecase 871225218
sqrispec 878578626
xmpn_copy 936064305
shiftispec 1226625156
umodiu 1272516447
dvmdii 1323749889
subiuspec 1431765432
adduispec 2131387059
subiispec 3155463312
cmpiispec 3742930977
addiispec 4257603801
muluispec 4295276022
muliispec_basecase 4571148639
muliispec 4772428185

Generated by: LCOV version 1.14