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 30571-c0dfe82732) Lines: 688 719 95.7 %
Date: 2025-12-08 09:22:00 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 200497
muluui 222711
divis 325451
convi 439764
pari_gmp_free 1755992
setloop 2999292
truncr 3458993
sqrtremi 5162733
xmpn_copy 6897347
floorr 6946505
diviuexact 31838887
red_montgomery 34995796
divri_with_gmp 35250982
remi2n 39181208
sqrispec_mirror 40083567
icopy_ef 41505061
absdiviu_rem 51102007
mpz2GEN 57810888
divrr_with_gmp 76253461
muliispec_mirror 83331265
divis_rem 86365798
incpos 103255570
incloop 103657452
GEN2mpz 115619475
sqrtr_abs 126392935
mantissa2nr 138414707
divrr 142547425
divri 151544904
xmpn_zero 237623623
equaliispec 268868446
int_normalize 307127910
affir 404491381
diviuexact_i 413844412
roundr_up_ip 518795122
diviiexact 534717586
xmpn_mirror 584809266
xmpn_mirrorcopy 714131083
shiftispec 720291123
adduispec_offset 764521805
sqrispec 1030134061
umodiu 1328330272
subiuspec 1780581348
dvmdii 2197608478
adduispec 2789687765
subiispec 3024516533
addiispec 3338169923
cmpiispec 3982899532
muluispec 5607123186
muliispec 5845866633

Generated by: LCOV version 1.16