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 30371-bd27ad7662) Lines: 683 719 95.0 %
Date: 2025-07-07 09:23:05 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 200455
muluui 222686
convi 438671
divis 1006037
pari_gmp_free 1755950
setloop 2997876
truncr 3625318
sqrtremi 5182347
xmpn_copy 6890006
floorr 7126614
red_montgomery 34929510
divri_with_gmp 35250859
remi2n 38907512
diviuexact 39411367
icopy_ef 41255075
sqrispec_mirror 41388965
mpz2GEN 57697281
divrr_with_gmp 76131360
muliispec_mirror 85074306
divis_rem 86177959
incpos 102821437
incloop 103222144
absdiviu_rem 110755461
GEN2mpz 115391939
sqrtr_abs 126365957
mantissa2nr 138178372
divrr 142760970
divri 151397587
xmpn_zero 237503223
equaliispec 269584661
int_normalize 308191038
affir 403759533
diviuexact_i 420675335
roundr_up_ip 527566812
diviiexact 533351380
xmpn_mirror 587220215
shiftispec 714344330
xmpn_mirrorcopy 718620059
adduispec_offset 767265293
sqrispec 1025410640
umodiu 1316589518
subiuspec 1777083201
dvmdii 2195862890
adduispec 2789954303
subiispec 3018263775
addiispec 3333847448
cmpiispec 3971308860
muluispec 5614281856
muliispec 5951141500

Generated by: LCOV version 1.16