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 30584-b9873745ba) Lines: 683 719 95.0 %
Date: 2025-12-21 09:21: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 200509
muluui 222736
divis 323942
convi 439782
pari_gmp_free 1735789
setloop 2999293
truncr 3456113
sqrtremi 5159910
xmpn_copy 6832560
floorr 6945891
diviuexact 31784560
red_montgomery 34394933
divri_with_gmp 35250843
remi2n 37705761
sqrispec_mirror 40097327
icopy_ef 41491840
absdiviu_rem 51096412
mpz2GEN 57802280
divrr_with_gmp 76250956
muliispec_mirror 83303812
divis_rem 86360337
incpos 103295926
incloop 103704528
GEN2mpz 115602223
sqrtr_abs 126384799
mantissa2nr 138405070
divrr 142545888
divri 151539250
xmpn_zero 237624378
equaliispec 268809587
int_normalize 309106452
affir 404353287
diviuexact_i 413109756
roundr_up_ip 518614140
diviiexact 534021588
xmpn_mirror 584701345
shiftispec 713487906
xmpn_mirrorcopy 714181266
adduispec_offset 764720499
sqrispec 1024893405
umodiu 1329045010
subiuspec 1780255925
dvmdii 2192604782
adduispec 2788730478
subiispec 3019246012
addiispec 3334123820
cmpiispec 3975655567
muluispec 5603054291
muliispec 5835659345

Generated by: LCOV version 1.16