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 30111-a34de28cf8) Lines: 683 719 95.0 %
Date: 2025-04-02 09:20:49 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 1100
pari_kernel_init 1108
incneg 66684
resetloop 174328
diviuuexact 200468
muluui 222707
convi 438297
divis 966295
pari_gmp_free 1758366
setloop 2997597
truncr 3528943
sqrtremi 5114467
xmpn_copy 6706542
floorr 6974551
red_montgomery 33641583
divri_with_gmp 35194798
remi2n 37305556
diviuexact 38821481
icopy_ef 41070378
sqrispec_mirror 41392425
mpz2GEN 57591814
divrr_with_gmp 75733689
muliispec_mirror 84059932
divis_rem 85217117
incpos 102643463
incloop 103052802
absdiviu_rem 109383056
GEN2mpz 115181092
sqrtr_abs 125184527
mantissa2nr 137222987
divrr 141813083
divri 150498348
xmpn_zero 235867385
equaliispec 265913322
int_normalize 306591269
affir 400661680
diviuexact_i 411743196
roundr_up_ip 522049061
diviiexact 524057195
xmpn_mirror 583053824
shiftispec 703107366
xmpn_mirrorcopy 712801746
adduispec_offset 764870508
sqrispec 1016343200
umodiu 1305004348
subiuspec 1766739009
dvmdii 2173881735
adduispec 2774859090
subiispec 2998463176
addiispec 3312367061
cmpiispec 3940958521
muluispec 5544261707
muliispec 5878171070

Generated by: LCOV version 1.16