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 30586-ccf601f509) Lines: 684 719 95.1 %
Date: 2025-12-25 09:21:36 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 200447
muluui 222695
divis 323933
convi 439781
pari_gmp_free 1735790
setloop 2999295
truncr 3461462
sqrtremi 5159884
xmpn_copy 6832785
floorr 6948588
diviuexact 31786668
red_montgomery 34459430
divri_with_gmp 35251270
remi2n 37717338
sqrispec_mirror 40101706
icopy_ef 41495842
absdiviu_rem 51096023
mpz2GEN 57803961
divrr_with_gmp 76258450
muliispec_mirror 83315044
divis_rem 86372222
incpos 103434643
incloop 103840525
GEN2mpz 115605598
sqrtr_abs 126391469
mantissa2nr 138415871
divrr 142564294
divri 151540982
xmpn_zero 237656694
equaliispec 268815096
int_normalize 308935925
affir 404497488
diviuexact_i 413224600
roundr_up_ip 518776081
diviiexact 534134121
xmpn_mirror 584885877
shiftispec 713785780
xmpn_mirrorcopy 714365255
adduispec_offset 764724155
sqrispec 1025432671
umodiu 1329686887
subiuspec 1780311180
dvmdii 2193260446
adduispec 2789754491
subiispec 3020052405
addiispec 3335113158
cmpiispec 3976924583
muluispec 5607755303
muliispec 5840377115

Generated by: LCOV version 1.16