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 30580-ef5a862e7f) Lines: 1115 1153 96.7 %
Date: 2025-12-19 09:23:05 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 240075
sqrtispec2_sh 271260
convi 317892
Zf_sqr 448896
convi_dac 737352
setloop 2248395
truncr 2554992
sqrtispec1_sh 2734512
sqrtremi 3793950
floorr 5204493
Zf_mul 15338496
muliifft_dis 15702102
remi2n 20108268
diviuexact 22441548
diviuexact_i 29699304
muliifft_dit 30956967
incpos 34964676
incloop 35267175
red_montgomery 40602168
mantissa2nr 49216710
divis_rem 65920113
sqrtr_abs 91778400
xmpn_zero 91778400
sqrtispec2 92566023
p_sqrtu2 92837283
p_sqrtu1 95571795
divri 114315663
divrr 130134171
Zf_add 187658496
Zf_mulsqrt2 187658496
Zf_sub 191070960
equaliispec 199808859
Zf_shift 206264025
absdiviu_rem 234699771
affir 323339811
sqrtispec 329925210
diviiexact 397946886
Zf_red_destroy 399271821
roundr_up_ip 442642507
catii 474718374
adduispec_offset 491215167
addshiftw 707905122
int_normalize 856781304
sqrispec_basecase 941399859
sqrispec 951339744
xmpn_copy 1082319069
shiftispec 1289899065
umodiu 1434181098
subiuspec 1599175218
dvmdii 1688453226
adduispec 2401699725
subiispec 3403891017
cmpiispec 4136188737
addiispec 4595298102
muluispec 4858842120
muliispec_basecase 5175354849
muliispec 5402525565

Generated by: LCOV version 1.16