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: 683 719 95.0 %
Date: 2025-12-10 09:22:03 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 200460
muluui 222694
divis 325446
convi 439759
pari_gmp_free 1755987
setloop 2999295
truncr 3456923
sqrtremi 5162678
xmpn_copy 6897532
floorr 6946181
diviuexact 31841219
red_montgomery 34979398
divri_with_gmp 35251375
remi2n 39218060
sqrispec_mirror 40077690
icopy_ef 41506818
absdiviu_rem 51106920
mpz2GEN 57812510
divrr_with_gmp 76254009
muliispec_mirror 83433075
divis_rem 86375366
incpos 103306674
incloop 103707200
GEN2mpz 115622686
sqrtr_abs 126399156
mantissa2nr 138426209
divrr 142551072
divri 151544617
xmpn_zero 237641523
equaliispec 268871013
int_normalize 307228536
affir 404534402
diviuexact_i 413916850
roundr_up_ip 518805685
diviiexact 534790298
xmpn_mirror 584905416
xmpn_mirrorcopy 714319771
shiftispec 720515764
adduispec_offset 764764976
sqrispec 1030353811
umodiu 1328623396
subiuspec 1780671921
dvmdii 2198260155
adduispec 2790229457
subiispec 3024787356
addiispec 3338600618
cmpiispec 3983391811
muluispec 5607815400
muliispec 5846425663

Generated by: LCOV version 1.16