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 30106-3f17b77578) Lines: 683 719 95.0 %
Date: 2025-03-31 09:19:50 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 1100
pari_kernel_init 1108
incneg 66684
resetloop 174328
diviuuexact 200469
muluui 222695
convi 438280
divis 966294
pari_gmp_free 1758362
setloop 2997598
truncr 3529539
sqrtremi 5114414
xmpn_copy 6706341
floorr 6975662
red_montgomery 33647636
divri_with_gmp 35194837
remi2n 35377228
diviuexact 38822693
icopy_ef 41071308
sqrispec_mirror 41388731
mpz2GEN 57592638
divrr_with_gmp 75736111
muliispec_mirror 84089476
divis_rem 85234408
incpos 103263628
incloop 103671172
absdiviu_rem 109388894
GEN2mpz 115182587
sqrtr_abs 125193127
mantissa2nr 137224482
divrr 141815640
divri 150499810
xmpn_zero 235879070
equaliispec 265914573
int_normalize 306722833
affir 400688976
diviuexact_i 410679952
roundr_up_ip 521990952
diviiexact 522986692
xmpn_mirror 583195758
shiftispec 702350636
xmpn_mirrorcopy 712927083
adduispec_offset 764850290
sqrispec 1016712138
umodiu 1304949171
subiuspec 1766824559
dvmdii 2174075134
adduispec 2774486346
subiispec 2999763328
addiispec 3312552149
cmpiispec 3938362929
muluispec 5541342878
muliispec 5875544607

Generated by: LCOV version 1.16