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 30590-f14e077362) Lines: 684 719 95.1 %
Date: 2025-12-31 09:21: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 200534
muluui 222771
divis 323942
convi 439777
pari_gmp_free 1735793
setloop 2999292
truncr 3458059
sqrtremi 5159859
xmpn_copy 6832592
floorr 6946845
diviuexact 31787426
red_montgomery 34422152
divri_with_gmp 35252062
remi2n 37757766
sqrispec_mirror 40097430
icopy_ef 41492150
absdiviu_rem 51094670
mpz2GEN 57803111
divrr_with_gmp 76256288
muliispec_mirror 83327761
divis_rem 86365643
incpos 103311688
incloop 103720356
GEN2mpz 115603721
sqrtr_abs 126399809
mantissa2nr 138436090
divrr 142564595
divri 151542979
xmpn_zero 237691320
equaliispec 268815797
int_normalize 309217698
affir 404543942
diviuexact_i 413352786
roundr_up_ip 518831036
diviiexact 534265693
xmpn_mirror 585094818
shiftispec 714092886
xmpn_mirrorcopy 714566887
adduispec_offset 765259103
sqrispec 1025477977
umodiu 1329841376
subiuspec 1780730120
dvmdii 2194914300
adduispec 2790340964
subiispec 3020730472
addiispec 3335795714
cmpiispec 3978002892
muluispec 5610850527
muliispec 5843210941

Generated by: LCOV version 1.16