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.10.0 lcov report (development 20422-b487f4d) Lines: 639 716 89.2 %
Date: 2017-03-22 05:51:54 Functions: 53 54 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
GEN2mpz 227417471
addiispec 1479389060
adduispec 1118379348
adduispec_offset 319304950
addumului 759736
affir 105491951
cmpiispec 1763820089
convi 491591
diviiexact 235295187
divis 268064
divis_rem 24889021
diviu_rem 127085952
diviuexact 249987194
diviuuexact 532396
divri 17048715
divri_with_gmp 3212356
divrr 82987539
divrr_with_gmp 32950843
dvmdii 799328713
equaliispec 55464155
floorr 449399
icopy_ef 16365689
incloop 32904721
incneg 6188
incpos 32887152
int_normalize 145534532
mantissa2nr 22296253
mpz2GEN 218218213
muliispec 2027229839
muliispec_mirror 63386763
muluispec 2089581452
muluui 554604
pari_gmp_free 203177
pari_gmp_realloc 0
pari_kernel_close 1328
pari_kernel_init 820
red_montgomery 6980124
remi2n 10056151
resetloop 170652
roundr_up_ip 267167929
setloop 2445703
shiftispec 333802222
sqrispec 675150477
sqrispec_mirror 4958759
sqrtr_abs 21883782
sqrtremi 3040262
subiispec 1420069179
subiuspec 781645507
truncr 1474939
umodiu 800735736
xmpn_copy 1273301
xmpn_mirror 185623605
xmpn_mirrorcopy 278186933
xmpn_zero 58046981

Generated by: LCOV version 1.11