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 30552-d1d0643eee) Lines: 683 719 95.0 %
Date: 2025-11-23 09:22:56 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 200452
muluui 222682
divis 325429
convi 439609
pari_gmp_free 1755951
setloop 2999293
truncr 3461182
sqrtremi 5162123
xmpn_copy 6897189
floorr 6945984
diviuexact 31836866
red_montgomery 35069669
divri_with_gmp 35251729
remi2n 39066952
sqrispec_mirror 40041801
icopy_ef 41494425
absdiviu_rem 51016485
mpz2GEN 57763610
divrr_with_gmp 76238243
muliispec_mirror 83215173
divis_rem 86245911
incpos 103233968
incloop 103639619
GEN2mpz 115524273
sqrtr_abs 126364049
mantissa2nr 138306712
divrr 142529382
divri 151468872
xmpn_zero 237562853
equaliispec 268858999
int_normalize 307073716
affir 404200097
diviuexact_i 413140365
roundr_up_ip 518365934
diviiexact 533840509
xmpn_mirror 584285499
xmpn_mirrorcopy 713749627
shiftispec 720072206
adduispec_offset 764448067
sqrispec 1030539363
umodiu 1331531053
subiuspec 1778965525
dvmdii 2196663489
adduispec 2790040926
subiispec 3023316455
addiispec 3336507364
cmpiispec 3979556778
muluispec 5599416239
muliispec 5839270129

Generated by: LCOV version 1.16