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 30587-f85873d515) Lines: 684 719 95.1 %
Date: 2025-12-29 09:21:39 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 200477
muluui 222711
divis 323936
convi 439784
pari_gmp_free 1735802
setloop 2999290
truncr 3457404
sqrtremi 5159934
xmpn_copy 6832565
floorr 6945383
diviuexact 31787461
red_montgomery 34430838
divri_with_gmp 35250670
remi2n 37860796
sqrispec_mirror 40086273
icopy_ef 41494802
absdiviu_rem 51092675
mpz2GEN 57806362
divrr_with_gmp 76252007
muliispec_mirror 83336297
divis_rem 86369429
incpos 103505990
incloop 103903386
GEN2mpz 115610493
sqrtr_abs 126381973
mantissa2nr 138401105
divrr 142545323
divri 151538509
xmpn_zero 237625013
equaliispec 268814913
int_normalize 309260760
affir 404450539
diviuexact_i 413250711
roundr_up_ip 518704807
diviiexact 534156681
xmpn_mirror 584878642
shiftispec 713773598
xmpn_mirrorcopy 714331521
adduispec_offset 764799239
sqrispec 1025227167
umodiu 1330033036
subiuspec 1780553989
dvmdii 2193833125
adduispec 2789565601
subiispec 3020085534
addiispec 3335044642
cmpiispec 3977069394
muluispec 5606560849
muliispec 5838532644

Generated by: LCOV version 1.16