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.12.0 lcov report (development 23017-8c5e72c46) Lines: 650 719 90.4 %
Date: 2018-09-23 05:39:13 Functions: 54 55 98.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
pari_gmp_realloc 0
pari_kernel_close 888
pari_kernel_init 896
incneg 6272
resetloop 170652
pari_gmp_free 278403
convi 535816
diviuuexact 618647
muluui 640855
floorr 737464
addumului 931451
divis 1051266
xmpn_copy 1886083
truncr 1944248
setloop 2900404
sqrtremi 3604831
divri_with_gmp 3749988
sqrispec_mirror 6892747
red_montgomery 10769670
muliispec_mirror 13809272
icopy_ef 16085195
remi2n 16950975
mpz2GEN 18828738
sqrtr_abs 28104122
mantissa2nr 30466246
divri 30694310
incpos 32113585
incloop 32423048
diviuexact 34887026
GEN2mpz 37657476
divis_rem 45899674
divrr_with_gmp 50511480
xmpn_zero 82365590
int_normalize 90230249
divrr 108585200
equaliispec 119550392
absdiviu_rem 141706628
affir 147611210
xmpn_mirror 180301515
xmpn_mirrorcopy 246896606
adduispec_offset 250425183
diviuexact_i 272024824
diviiexact 311509547
roundr_up_ip 339487436
shiftispec 391765241
sqrispec 752241917
subiuspec 835675834
dvmdii 841377281
umodiu 971100113
adduispec 1190660595
subiispec 1559105131
addiispec 1627387215
cmpiispec 1960354870
muliispec 2243178064
muluispec 2423389948

Generated by: LCOV version 1.13