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 30256-57c6c2b57f) Lines: 688 719 95.7 %
Date: 2025-05-09 09:19:30 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 200486
muluui 222711
convi 438559
divis 966619
pari_gmp_free 1759234
setloop 2997603
truncr 3543378
sqrtremi 5114746
xmpn_copy 6706885
floorr 7001099
red_montgomery 33641261
divri_with_gmp 35235553
remi2n 37409706
diviuexact 39182358
icopy_ef 41191440
sqrispec_mirror 41415537
mpz2GEN 57562364
divrr_with_gmp 75794112
divis_rem 85222431
muliispec_mirror 85236796
incpos 103043966
incloop 103449670
absdiviu_rem 109860778
GEN2mpz 115122768
sqrtr_abs 125621563
mantissa2nr 137371060
divrr 141823454
divri 151126210
xmpn_zero 236401478
equaliispec 267252661
int_normalize 307115387
affir 401187154
diviuexact_i 413739934
roundr_up_ip 524450068
diviiexact 525661274
xmpn_mirror 584905210
shiftispec 703541022
xmpn_mirrorcopy 716215405
adduispec_offset 765774087
sqrispec 1018894515
umodiu 1303968685
subiuspec 1768120392
dvmdii 2178597692
adduispec 2779482985
subiispec 3003167652
addiispec 3319878615
cmpiispec 3943191202
muluispec 5585209265
muliispec 5921277531

Generated by: LCOV version 1.16