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.18.1 lcov report (development 30499-74bdd0ac5b) Lines: 1115 1153 96.7 %
Date: 2025-09-18 09:23:44 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 786
pari_kernel_init 788
sqrispec_fft 1659
incneg 50013
muliispec_fft 83631
muliifft_unspliti 85290
mulliifft_params 85290
resetloop 130656
diviuuexact 149898
muluui 166566
muliifft_spliti 168921
divis 240009
sqrtispec2_sh 271143
convi 317650
Zf_sqr 448896
convi_dac 737406
setloop 2248392
truncr 2700357
sqrtispec1_sh 2734290
sqrtremi 3793461
floorr 5350179
Zf_mul 15338496
muliifft_dis 15702102
remi2n 20045892
diviuexact 22434297
diviuexact_i 29602317
muliifft_dit 30956967
incpos 34963509
incloop 35266008
red_montgomery 40617075
mantissa2nr 49151226
divis_rem 65817912
sqrtr_abs 92017659
xmpn_zero 92017659
sqrtispec2 92805132
p_sqrtu2 93076275
p_sqrtu1 95810565
divri 114247470
divrr 130378089
Zf_add 187658496
Zf_mulsqrt2 187658496
Zf_sub 191070960
equaliispec 199778889
Zf_shift 206264025
absdiviu_rem 233520945
affir 323170962
sqrtispec 330910875
diviiexact 396846087
Zf_red_destroy 399271821
roundr_up_ip 449252806
catii 476211486
adduispec_offset 491229129
addshiftw 708431331
int_normalize 858266880
sqrispec_basecase 942010047
sqrispec 951949851
xmpn_copy 1085662518
shiftispec 1289962941
umodiu 1432080006
subiuspec 1597625880
dvmdii 1687012035
adduispec 2399886279
subiispec 3402372657
cmpiispec 4133044188
addiispec 4592067834
muluispec 4851957702
muliispec_basecase 5169153825
muliispec 5396214264

Generated by: LCOV version 1.16