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 30571-c0dfe82732) Lines: 683 719 95.0 %
Date: 2025-12-05 09:21:30 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 200461
muluui 222687
divis 325454
convi 439762
pari_gmp_free 1755990
setloop 2999294
truncr 3457764
sqrtremi 5162788
xmpn_copy 6897614
floorr 6946926
diviuexact 31836380
red_montgomery 34932068
divri_with_gmp 35251722
remi2n 39152877
sqrispec_mirror 40089739
icopy_ef 41504360
absdiviu_rem 51098092
mpz2GEN 57807709
divrr_with_gmp 76255521
muliispec_mirror 83343523
divis_rem 86358723
incpos 103398728
incloop 103799161
GEN2mpz 115612563
sqrtr_abs 126400981
mantissa2nr 138424657
divrr 142555194
divri 151545496
xmpn_zero 237628808
equaliispec 268869598
int_normalize 307009433
affir 404416938
diviuexact_i 413684305
roundr_up_ip 518696920
diviiexact 534568435
xmpn_mirror 584740282
xmpn_mirrorcopy 714114699
shiftispec 720301126
adduispec_offset 764639322
sqrispec 1030323041
umodiu 1328088143
subiuspec 1780263772
dvmdii 2197478265
adduispec 2789502203
subiispec 3024684043
addiispec 3337710847
cmpiispec 3982859052
muluispec 5604054407
muliispec 5843563634

Generated by: LCOV version 1.16