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 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.8.0 lcov report (development 18889-ac2cbba) Lines: 641 716 89.5 %
Date: 2016-05-01 Functions: 53 54 98.1 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 425 533 79.7 %

Function Name Sort by function name Hit count Sort by hit count
GEN2mpz 162173721
addiispec 1431727993
adduispec 1154742775
adduispec_offset 320928838
addumului 1098287
affir 132427351
cmpiispec 1965943498
convi 479599
diviiexact 254426398
divis 339893
divis_rem 30756683
diviu_rem 122366335
diviuexact 233189320
diviuuexact 503810
divri 17632034
divri_with_gmp 3585295
divrr 105624624
divrr_with_gmp 31027201
dvmdii 741881581
equaliispec 35146832
floorr 510329
icopy_ef 18832961
incloop 31152819
incneg 6188
incpos 31168687
int_normalize 131084392
mantissa2nr 23521036
mpz2GEN 144447575
muliispec 1527709811
muliispec_mirror 61055838
muluispec 1728373800
muluui 526018
pari_gmp_free 7475
pari_gmp_realloc 0
pari_kernel_close 1272
pari_kernel_init 1780
red_montgomery 6613291
remi2n 10541773
resetloop 156744
roundr_up_ip 176816751
setloop 2233417
shiftispec 282532645
sqrispec 614295353
sqrispec_mirror 4212023
sqrtr_abs 22498859
sqrtremi 1695251
subiispec 1691844487
subiuspec 1035114262
truncr 743395
umodiu 659666794
xmpn_copy 1250666
xmpn_mirror 209000122
xmpn_mirrorcopy 269402289
xmpn_zero 57111355

Generated by: LCOV version 1.9