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 30209-fa4743ed68) Lines: 683 719 95.0 %
Date: 2025-04-25 09:18:24 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 200449
muluui 222673
convi 438496
divis 966288
pari_gmp_free 1759232
setloop 2997595
truncr 3543289
sqrtremi 5114371
xmpn_copy 6705383
floorr 7001165
red_montgomery 33669356
divri_with_gmp 35194629
remi2n 37294573
diviuexact 39176844
icopy_ef 41190220
sqrispec_mirror 41387392
mpz2GEN 57558659
divrr_with_gmp 75705378
muliispec_mirror 84063749
divis_rem 85228863
incpos 102960904
incloop 103365654
absdiviu_rem 109845599
GEN2mpz 115114430
sqrtr_abs 125203119
mantissa2nr 137226300
divrr 141743074
divri 150463900
xmpn_zero 235825262
equaliispec 267212129
int_normalize 306413789
affir 400739707
diviuexact_i 413551772
roundr_up_ip 521977530
diviiexact 525464642
xmpn_mirror 583031954
shiftispec 703332243
xmpn_mirrorcopy 712731237
adduispec_offset 765200816
sqrispec 1019241436
umodiu 1303117825
subiuspec 1768052496
dvmdii 2177634746
adduispec 2773618608
subiispec 3002861245
addiispec 3313293434
cmpiispec 3941844615
muluispec 5544104707
muliispec 5876869132

Generated by: LCOV version 1.16