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 29877-9124a6ce27) Lines: 683 719 95.0 %
Date: 2025-01-18 09:08:44 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 1088
pari_kernel_init 1096
incneg 66652
resetloop 174328
diviuuexact 199475
muluui 221683
convi 437059
divis 966672
pari_gmp_free 1742360
setloop 2997445
truncr 3544269
sqrtremi 5110935
xmpn_copy 6874200
floorr 6978844
diviuexact 30724016
divri_with_gmp 35167797
remi2n 36051652
red_montgomery 36712310
icopy_ef 41183612
sqrispec_mirror 41376422
mpz2GEN 57621218
divrr_with_gmp 75725168
muliispec_mirror 83794151
divis_rem 85167481
incpos 99171274
incloop 99585940
absdiviu_rem 105104582
GEN2mpz 115240129
sqrtr_abs 125128865
mantissa2nr 137164713
divrr 141775234
divri 150174686
xmpn_zero 235791096
equaliispec 269714078
int_normalize 302211114
diviuexact_i 386421743
affir 400344120
diviiexact 504441581
roundr_up_ip 521136740
adduispec_offset 579527070
xmpn_mirror 582571606
shiftispec 704755680
xmpn_mirrorcopy 712251044
sqrispec 986232467
umodiu 1291618970
subiuspec 1719601438
dvmdii 1908171356
adduispec 2586604525
subiispec 2946856799
addiispec 3262701404
cmpiispec 3829011311
muluispec 5445288160
muliispec 5775687913

Generated by: LCOV version 1.16