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 30550-07450a7a86) Lines: 683 719 95.0 %
Date: 2025-11-17 09:22:41 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 200480
muluui 222727
divis 325430
convi 439610
pari_gmp_free 1755953
setloop 2999292
truncr 3441814
sqrtremi 5162131
xmpn_copy 6896910
floorr 6940570
diviuexact 31837858
red_montgomery 35070955
divri_with_gmp 35251453
remi2n 39051342
sqrispec_mirror 40042300
icopy_ef 41488292
absdiviu_rem 51008662
mpz2GEN 57763648
divrr_with_gmp 76223825
muliispec_mirror 83177201
divis_rem 86211156
incpos 103189008
incloop 103597297
GEN2mpz 115524458
sqrtr_abs 126358436
mantissa2nr 138300544
divrr 142503595
divri 151463679
xmpn_zero 237544693
equaliispec 268852265
int_normalize 307338386
affir 404138283
diviuexact_i 413220277
roundr_up_ip 518365382
diviiexact 533914172
xmpn_mirror 584276950
xmpn_mirrorcopy 713718153
shiftispec 720025492
adduispec_offset 764546151
sqrispec 1030354114
umodiu 1330183762
subiuspec 1778977231
dvmdii 2196337513
adduispec 2789173188
subiispec 3022780248
addiispec 3336429535
cmpiispec 3979099605
muluispec 5599900967
muliispec 5839588001

Generated by: LCOV version 1.16