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 30535-d1c72762fc) Lines: 683 719 95.0 %
Date: 2025-10-27 09:21:54 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 200456
muluui 222683
divis 325429
convi 439467
pari_gmp_free 1755945
setloop 2999290
truncr 3458353
sqrtremi 5161939
xmpn_copy 6897424
floorr 6944993
diviuexact 31842043
red_montgomery 35009856
divri_with_gmp 35248633
remi2n 39042167
sqrispec_mirror 40047354
icopy_ef 41488502
absdiviu_rem 50860807
mpz2GEN 57762335
divrr_with_gmp 76230979
muliispec_mirror 83266157
divis_rem 86248531
incpos 102915989
incloop 103320568
GEN2mpz 115522030
sqrtr_abs 126357592
mantissa2nr 138312157
divrr 142503528
divri 151448886
xmpn_zero 237565112
equaliispec 268847667
int_normalize 306485228
affir 404099910
diviuexact_i 413235565
roundr_up_ip 518454438
diviiexact 533926224
xmpn_mirror 584306311
xmpn_mirrorcopy 713797937
shiftispec 720156002
adduispec_offset 764443365
sqrispec 1030516978
umodiu 1329125134
subiuspec 1778783530
dvmdii 2196904947
adduispec 2788875923
subiispec 3022859877
addiispec 3336703434
cmpiispec 3979543483
muluispec 5600789883
muliispec 5840389703

Generated by: LCOV version 1.16