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 30532-0c728fd268) Lines: 688 719 95.7 %
Date: 2025-10-17 09:22:15 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 200475
muluui 222675
divis 325429
convi 439465
pari_gmp_free 1755956
setloop 2999288
truncr 3635683
sqrtremi 5161997
xmpn_copy 6897282
floorr 7135659
diviuexact 31840384
red_montgomery 34921457
divri_with_gmp 35249397
remi2n 39073093
icopy_ef 41482149
sqrispec_mirror 41491687
absdiviu_rem 50863293
mpz2GEN 57762201
divrr_with_gmp 76389264
muliispec_mirror 85189268
divis_rem 86214812
incpos 103116570
incloop 103520900
GEN2mpz 115521902
sqrtr_abs 126695299
mantissa2nr 138487815
divrr 142851295
divri 151446339
xmpn_zero 238068678
equaliispec 268843165
int_normalize 306750946
affir 404156392
diviuexact_i 413212551
roundr_up_ip 527340480
diviiexact 533906591
xmpn_mirror 587904485
xmpn_mirrorcopy 720153433
shiftispec 720224397
adduispec_offset 764547898
sqrispec 1032006372
umodiu 1328273395
subiuspec 1778685245
dvmdii 2196756722
adduispec 2788031012
subiispec 3022932089
addiispec 3336647068
cmpiispec 3979848125
muluispec 5600098708
muliispec 5841444614

Generated by: LCOV version 1.16