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-11 09:22:11 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 200496
muluui 222713
divis 325444
convi 439756
pari_gmp_free 1755992
setloop 2999295
truncr 3460709
sqrtremi 5162824
xmpn_copy 6897572
floorr 6948833
diviuexact 31839640
red_montgomery 35007586
divri_with_gmp 35250920
remi2n 39153380
sqrispec_mirror 40089092
icopy_ef 41506078
absdiviu_rem 51100898
mpz2GEN 57812681
divrr_with_gmp 76256409
muliispec_mirror 83366273
divis_rem 86378464
incpos 103395689
incloop 103795832
GEN2mpz 115622716
sqrtr_abs 126390957
mantissa2nr 138414634
divrr 142551653
divri 151544836
xmpn_zero 237624398
equaliispec 268871618
int_normalize 307128735
affir 404485271
diviuexact_i 413888829
roundr_up_ip 518792842
diviiexact 534768616
xmpn_mirror 584801927
xmpn_mirrorcopy 714181888
shiftispec 720537806
adduispec_offset 764643318
sqrispec 1030728687
umodiu 1328212885
subiuspec 1780678934
dvmdii 2198268410
adduispec 2789974127
subiispec 3025477641
addiispec 3338505121
cmpiispec 3984290102
muluispec 5607038038
muliispec 5846463894

Generated by: LCOV version 1.16