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-18 09:23:44 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 222706
divis 325423
convi 439397
pari_gmp_free 1755961
setloop 2999289
truncr 3654318
sqrtremi 5162023
xmpn_copy 6897172
floorr 7139265
diviuexact 31843330
red_montgomery 35059013
divri_with_gmp 35250673
remi2n 39078813
sqrispec_mirror 41490737
icopy_ef 41494084
absdiviu_rem 50858319
mpz2GEN 57768346
divrr_with_gmp 76405432
muliispec_mirror 85072990
divis_rem 86252228
incpos 102483777
incloop 102891227
GEN2mpz 115534124
sqrtr_abs 126689612
mantissa2nr 138487818
divrr 142852853
divri 151457561
xmpn_zero 238115790
equaliispec 268849404
int_normalize 306573842
affir 404222183
diviuexact_i 413257916
roundr_up_ip 527484065
diviiexact 533968460
xmpn_mirror 587923751
xmpn_mirrorcopy 720127733
shiftispec 720352624
adduispec_offset 764481831
sqrispec 1031610079
umodiu 1328564966
subiuspec 1778990622
dvmdii 2196661077
adduispec 2787813229
subiispec 3022958980
addiispec 3336784749
cmpiispec 3978862058
muluispec 5602081137
muliispec 5842958779

Generated by: LCOV version 1.16