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 30569-8181146aa1) Lines: 683 719 95.0 %
Date: 2025-12-04 09:22:12 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 222692
divis 325450
convi 439754
pari_gmp_free 1755989
setloop 2999293
truncr 3437102
sqrtremi 5162704
xmpn_copy 6897194
floorr 6940772
diviuexact 31842279
red_montgomery 34993768
divri_with_gmp 35250965
remi2n 39123147
sqrispec_mirror 40085990
icopy_ef 41495691
absdiviu_rem 51094610
mpz2GEN 57809162
divrr_with_gmp 76232984
muliispec_mirror 83352890
divis_rem 86357809
incpos 103087383
incloop 103487658
GEN2mpz 115615963
sqrtr_abs 126389964
mantissa2nr 138407544
divrr 142521288
divri 151538213
xmpn_zero 237597948
equaliispec 268860718
int_normalize 307122582
affir 404354489
diviuexact_i 413883520
roundr_up_ip 518716452
diviiexact 534745024
xmpn_mirror 584653459
xmpn_mirrorcopy 714047035
shiftispec 720342461
adduispec_offset 764435394
sqrispec 1030244626
umodiu 1328020984
subiuspec 1780473844
dvmdii 2197461174
adduispec 2789554174
subiispec 3024311470
addiispec 3337815339
cmpiispec 3982442280
muluispec 5605702693
muliispec 5844841534

Generated by: LCOV version 1.16