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 30256-57c6c2b57f) Lines: 683 719 95.0 %
Date: 2025-05-08 09:19:02 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 200499
muluui 222716
convi 438545
divis 966612
pari_gmp_free 1759242
setloop 2997602
truncr 3530749
sqrtremi 5114685
xmpn_copy 6706826
floorr 6997009
red_montgomery 33652592
divri_with_gmp 35235488
remi2n 37363374
diviuexact 39180405
icopy_ef 41187095
sqrispec_mirror 41402858
mpz2GEN 57560735
divrr_with_gmp 75781914
divis_rem 85198654
muliispec_mirror 85219885
incpos 103038754
incloop 103449138
absdiviu_rem 109862249
GEN2mpz 115118840
sqrtr_abs 125619831
mantissa2nr 137370657
divrr 141806053
divri 151122362
xmpn_zero 236382234
equaliispec 267247051
int_normalize 306807761
affir 401009326
diviuexact_i 413681708
roundr_up_ip 524379083
diviiexact 525595308
xmpn_mirror 584660181
shiftispec 703484150
xmpn_mirrorcopy 716024102
adduispec_offset 765592786
sqrispec 1018946182
umodiu 1305924087
subiuspec 1767887579
dvmdii 2178023555
adduispec 2781337696
subiispec 3002787164
addiispec 3319244827
cmpiispec 3942727267
muluispec 5583149225
muliispec 5920078556

Generated by: LCOV version 1.16