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.16.2 lcov report (development 29115-f22e516b23) Lines: 683 719 95.0 %
Date: 2024-04-30 08:08:06 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 1064
pari_kernel_init 1072
incneg 66652
resetloop 174328
diviuuexact 199486
muluui 221707
convi 423661
divis 958771
pari_gmp_free 1739265
setloop 2996871
truncr 3512768
sqrtremi 5096972
floorr 6965716
xmpn_copy 7125788
diviuexact 30311584
sqrispec_mirror 32819136
divri_with_gmp 34823113
remi2n 36363083
red_montgomery 37387370
icopy_ef 44177029
mpz2GEN 55560130
divrr_with_gmp 73380935
muliispec_mirror 82467818
divis_rem 83511106
incpos 100963027
incloop 101371069
absdiviu_rem 109975517
GEN2mpz 111117991
sqrtr_abs 119887741
mantissa2nr 132972669
divrr 136568901
divri 139059494
xmpn_zero 227850885
equaliispec 260776592
int_normalize 292155186
diviuexact_i 375501026
affir 389864720
diviiexact 494568745
roundr_up_ip 516695416
xmpn_mirror 559892063
adduispec_offset 574088739
xmpn_mirrorcopy 686604109
shiftispec 691785000
sqrispec 977240672
umodiu 1182434796
subiuspec 1588350040
dvmdii 1765713776
adduispec 2439734896
subiispec 2794132247
addiispec 3104531166
cmpiispec 3545463652
muluispec 5026828623
muliispec 5285686370

Generated by: LCOV version 1.14