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 30499-74bdd0ac5b) Lines: 683 719 95.0 %
Date: 2025-09-17 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 200489
muluui 222689
divis 325426
convi 439397
pari_gmp_free 1755948
setloop 2999291
truncr 3652565
sqrtremi 5161894
xmpn_copy 6897071
floorr 7138890
diviuexact 31842128
red_montgomery 35069485
divri_with_gmp 35250857
remi2n 39069848
sqrispec_mirror 41489771
icopy_ef 41490453
absdiviu_rem 50859643
mpz2GEN 57762886
divrr_with_gmp 76404318
muliispec_mirror 85051626
divis_rem 86251630
incpos 103213024
incloop 103619601
GEN2mpz 115523689
sqrtr_abs 126694162
mantissa2nr 138490225
divrr 142860223
divri 151457906
xmpn_zero 238121240
equaliispec 268847496
int_normalize 306630427
affir 404225213
diviuexact_i 413214069
roundr_up_ip 527465860
diviiexact 533921638
xmpn_mirror 587947706
xmpn_mirrorcopy 720142935
shiftispec 720349458
adduispec_offset 764552500
sqrispec 1031640227
umodiu 1330633255
subiuspec 1778735052
dvmdii 2196637892
adduispec 2789748475
subiispec 3022692895
addiispec 3336415293
cmpiispec 3979417398
muluispec 5601001065
muliispec 5842642791

Generated by: LCOV version 1.16