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 30558-88b7dc3357) Lines: 683 719 95.0 %
Date: 2025-11-27 09:21:46 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 200511
muluui 222715
divis 325428
convi 439601
pari_gmp_free 1755948
setloop 2999295
truncr 3439776
sqrtremi 5162162
xmpn_copy 6897052
floorr 6939717
diviuexact 31839090
red_montgomery 35001573
divri_with_gmp 35251347
remi2n 39083935
sqrispec_mirror 40044278
icopy_ef 41488676
absdiviu_rem 51009694
mpz2GEN 57764108
divrr_with_gmp 76224897
muliispec_mirror 83346332
divis_rem 86198374
incpos 103206740
incloop 103615056
GEN2mpz 115525760
sqrtr_abs 126368371
mantissa2nr 138310522
divrr 142499566
divri 151462941
xmpn_zero 237558738
equaliispec 268851639
int_normalize 307104261
affir 404110076
diviuexact_i 413218513
roundr_up_ip 518554373
diviiexact 533926435
xmpn_mirror 584308599
xmpn_mirrorcopy 713818480
shiftispec 720176517
adduispec_offset 764373164
sqrispec 1030198031
umodiu 1330734144
subiuspec 1778726648
dvmdii 2196157548
adduispec 2790222675
subiispec 3022467952
addiispec 3336304768
cmpiispec 3979203960
muluispec 5600852236
muliispec 5840254353

Generated by: LCOV version 1.16