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 30571-c0dfe82732) Lines: 683 719 95.0 %
Date: 2025-12-07 09:22:06 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 200477
muluui 222703
divis 325449
convi 439755
pari_gmp_free 1755987
setloop 2999293
truncr 3443787
sqrtremi 5162703
xmpn_copy 6897294
floorr 6942854
diviuexact 31839106
red_montgomery 34984938
divri_with_gmp 35250956
remi2n 39182793
sqrispec_mirror 40083242
icopy_ef 41498667
absdiviu_rem 51104244
mpz2GEN 57808500
divrr_with_gmp 76240143
muliispec_mirror 83344293
divis_rem 86348286
incpos 103288245
incloop 103692037
GEN2mpz 115614445
sqrtr_abs 126390182
mantissa2nr 138412078
divrr 142528082
divri 151540620
xmpn_zero 237606024
equaliispec 268865662
int_normalize 307152015
affir 404392461
diviuexact_i 413737022
roundr_up_ip 518715121
diviiexact 534622357
xmpn_mirror 584682211
xmpn_mirrorcopy 714089037
shiftispec 720394148
adduispec_offset 764652047
sqrispec 1030546983
umodiu 1330142227
subiuspec 1780187356
dvmdii 2198299299
adduispec 2791335648
subiispec 3024584551
addiispec 3338031007
cmpiispec 3982721755
muluispec 5606317617
muliispec 5845098189

Generated by: LCOV version 1.16