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 30393-1f60c30f77) Lines: 683 719 95.0 %
Date: 2025-07-15 09:22:36 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 200467
muluui 222713
convi 439105
divis 1006055
pari_gmp_free 1755949
setloop 2999283
truncr 3650443
sqrtremi 5182433
xmpn_copy 6889728
floorr 7136021
red_montgomery 35044941
divri_with_gmp 35247804
remi2n 39013676
diviuexact 39583171
icopy_ef 41270445
sqrispec_mirror 41403425
mpz2GEN 57691524
divrr_with_gmp 76148819
muliispec_mirror 84941180
divis_rem 86210339
incpos 103225678
incloop 103631544
absdiviu_rem 110606360
GEN2mpz 115380203
sqrtr_abs 126378784
mantissa2nr 138193391
divrr 142765894
divri 151398731
xmpn_zero 237581541
equaliispec 269624829
int_normalize 306334488
affir 403823149
diviuexact_i 418887488
roundr_up_ip 527372477
diviiexact 531365132
xmpn_mirror 587121558
shiftispec 714938373
xmpn_mirrorcopy 718672043
adduispec_offset 764209195
sqrispec 1028488096
umodiu 1325162513
subiuspec 1774112253
dvmdii 2195008703
adduispec 2782548475
subiispec 3016779574
addiispec 3330710027
cmpiispec 3973377134
muluispec 5603012986
muliispec 5937819995

Generated by: LCOV version 1.16