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-09 09:22:05 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 200481
muluui 222720
divis 325441
convi 439753
pari_gmp_free 1755990
setloop 2999290
truncr 3461159
sqrtremi 5162736
xmpn_copy 6897467
floorr 6947172
diviuexact 31839386
red_montgomery 34945901
divri_with_gmp 35251425
remi2n 39165603
sqrispec_mirror 40084303
icopy_ef 41506262
absdiviu_rem 51103610
mpz2GEN 57807902
divrr_with_gmp 76256774
muliispec_mirror 83372362
divis_rem 86384299
incpos 103374728
incloop 103775733
GEN2mpz 115613099
sqrtr_abs 126393976
mantissa2nr 138417103
divrr 142549252
divri 151545704
xmpn_zero 237626208
equaliispec 268870114
int_normalize 307115336
affir 404473407
diviuexact_i 413814344
roundr_up_ip 518789420
diviiexact 534685327
xmpn_mirror 584780231
xmpn_mirrorcopy 714129478
shiftispec 720337674
adduispec_offset 764532039
sqrispec 1030282132
umodiu 1330235492
subiuspec 1780415351
dvmdii 2197889737
adduispec 2791688619
subiispec 3024737357
addiispec 3338057230
cmpiispec 3983054713
muluispec 5606224488
muliispec 5845357056

Generated by: LCOV version 1.16