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.16.2 lcov report (development 29465-f396510193) Lines: 683 719 95.0 %
Date: 2024-07-25 09:03:53 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 1076
pari_kernel_init 1084
incneg 66652
resetloop 174328
diviuuexact 199444
muluui 221673
convi 427420
divis 965801
pari_gmp_free 1733453
setloop 2996970
truncr 3479273
sqrtremi 5100275
xmpn_copy 6679694
floorr 6948157
diviuexact 30747600
divri_with_gmp 35070281
remi2n 36536233
red_montgomery 37324853
icopy_ef 40505596
sqrispec_mirror 41340929
mpz2GEN 54914897
divrr_with_gmp 74642642
divis_rem 83909258
muliispec_mirror 84230821
incpos 99271888
incloop 99678403
absdiviu_rem 109526886
GEN2mpz 109827595
sqrtr_abs 124974983
mantissa2nr 137204915
divrr 140198581
divri 150757298
xmpn_zero 234496478
equaliispec 269942296
int_normalize 292540129
diviuexact_i 370581969
affir 397281352
diviiexact 472239927
roundr_up_ip 521073083
adduispec_offset 577384655
xmpn_mirror 580668756
shiftispec 691007497
xmpn_mirrorcopy 709979640
sqrispec 987050593
umodiu 1168573511
subiuspec 1662055715
dvmdii 1877872141
adduispec 2519056167
subiispec 2867289577
addiispec 3161788784
cmpiispec 3726022735
muluispec 5330485511
muliispec 5672839457

Generated by: LCOV version 1.16