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 30446-bebd557ed6) Lines: 1115 1153 96.7 %
Date: 2025-08-05 09:23:54 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
sqrtispec2_sh 271143
convi 317409
Zf_sqr 448896
convi_dac 736878
divis 751419
setloop 2248386
truncr 2697669
sqrtispec1_sh 2733366
sqrtremi 3792537
floorr 5348358
Zf_mul 15338496
muliifft_dis 15702102
remi2n 20033826
diviuexact 29442144
diviuexact_i 29611548
muliifft_dit 30956967
incpos 34963326
incloop 35265825
red_montgomery 40617075
mantissa2nr 49147380
divis_rem 65816862
sqrtr_abs 91957950
xmpn_zero 91957950
sqrtispec2 92745423
p_sqrtu2 93016566
p_sqrtu1 95749932
divri 114249693
divrr 130394790
Zf_add 187658496
Zf_mulsqrt2 187658496
Zf_sub 191070960
equaliispec 200367108
Zf_shift 206264025
absdiviu_rem 281483412
affir 323187603
sqrtispec 330563463
diviiexact 397418565
Zf_red_destroy 399271821
roundr_up_ip 449269642
catii 475636080
adduispec_offset 491224728
addshiftw 708054510
int_normalize 857690016
sqrispec_basecase 941676435
sqrispec 951615783
xmpn_copy 1084420110
shiftispec 1288016202
umodiu 1431804165
subiuspec 1597459314
dvmdii 1686533760
adduispec 2399749281
subiispec 3401425593
cmpiispec 4134750756
addiispec 4590936993
muluispec 4863081390
muliispec_basecase 5247813765
muliispec 5474828316

Generated by: LCOV version 1.16