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

Generated by: LCOV version 1.14