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 30532-0c728fd268) Lines: 683 719 95.0 %
Date: 2025-10-19 09:22:25 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 200535
muluui 222749
divis 325427
convi 439470
pari_gmp_free 1755951
setloop 2999286
truncr 3659241
sqrtremi 5162113
xmpn_copy 6897283
floorr 7143722
diviuexact 31840108
red_montgomery 34990441
divri_with_gmp 35249290
remi2n 39029382
sqrispec_mirror 41485563
icopy_ef 41494811
absdiviu_rem 50865967
mpz2GEN 57768635
divrr_with_gmp 76409540
muliispec_mirror 85160124
divis_rem 86233887
incpos 103064520
incloop 103470383
GEN2mpz 115535100
sqrtr_abs 126700097
mantissa2nr 138493706
divrr 142884492
divri 151453373
xmpn_zero 238093630
equaliispec 268850390
int_normalize 306509712
affir 404195872
diviuexact_i 413165686
roundr_up_ip 527357028
diviiexact 533877809
xmpn_mirror 587880048
shiftispec 720090058
xmpn_mirrorcopy 720099958
adduispec_offset 764382187
sqrispec 1031765494
umodiu 1330163050
subiuspec 1778783588
dvmdii 2196413786
adduispec 2790010943
subiispec 3022747666
addiispec 3336526733
cmpiispec 3979410962
muluispec 5600401707
muliispec 5842153249

Generated by: LCOV version 1.16