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/gmp - mp.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30582-6e9af8ee1d) Lines: 683 719 95.0 %
Date: 2025-12-20 09:23:49 Functions: 54 56 96.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addumului 0
pari_gmp_realloc 0
pari_kernel_version 4
pari_kernel_close 1104
pari_kernel_init 1112
incneg 66684
resetloop 174328
diviuuexact 200491
muluui 222727
divis 325552
convi 439733
pari_gmp_free 1752302
setloop 2999295
truncr 3461935
sqrtremi 5162723
xmpn_copy 6935082
floorr 6948328
diviuexact 31850951
divri_with_gmp 35252734
red_montgomery 35395434
remi2n 39166797
sqrispec_mirror 40095374
icopy_ef 41505380
absdiviu_rem 51105345
mpz2GEN 57805780
divrr_with_gmp 76261326
muliispec_mirror 83264021
divis_rem 86389732
incpos 103106906
incloop 103504847
GEN2mpz 115608798
sqrtr_abs 126400524
mantissa2nr 138434983
divrr 142573497
divri 151548991
xmpn_zero 237649519
equaliispec 268888971
int_normalize 308533375
affir 404540421
diviuexact_i 414491269
roundr_up_ip 518739421
diviiexact 535341664
xmpn_mirror 584895324
xmpn_mirrorcopy 714247488
shiftispec 720940456
adduispec_offset 764634121
sqrispec 1031299572
umodiu 1330841248
subiuspec 1781212768
dvmdii 2199484142
adduispec 2790680610
subiispec 3026912880
addiispec 3340401924
cmpiispec 3985369553
muluispec 5608016216
muliispec 5847517491

Generated by: LCOV version 1.16