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-03 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 200493
muluui 222707
divis 325452
convi 439764
pari_gmp_free 1755989
setloop 2999293
truncr 3455503
sqrtremi 5162745
xmpn_copy 6897182
floorr 6945347
diviuexact 31838918
red_montgomery 34936635
divri_with_gmp 35250246
remi2n 39143258
sqrispec_mirror 40082551
icopy_ef 41504008
absdiviu_rem 51093362
mpz2GEN 57809763
divrr_with_gmp 76251300
muliispec_mirror 83339842
divis_rem 86374654
incpos 103067057
incloop 103469994
GEN2mpz 115617107
sqrtr_abs 126390272
mantissa2nr 138407833
divrr 142540890
divri 151542194
xmpn_zero 237618958
equaliispec 268869007
int_normalize 307092056
affir 404361441
diviuexact_i 413749009
roundr_up_ip 518696350
diviiexact 534620377
xmpn_mirror 584681876
xmpn_mirrorcopy 714103085
shiftispec 720349665
adduispec_offset 764367804
sqrispec 1030412768
umodiu 1332052032
subiuspec 1780230217
dvmdii 2197354768
adduispec 2793221863
subiispec 3024397129
addiispec 3337778473
cmpiispec 3982336209
muluispec 5604593590
muliispec 5843710146

Generated by: LCOV version 1.16