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

Generated by: LCOV version 1.16