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-bordeaux1.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 17566-be4cfd0) Lines: 641 716 89.5 %
Date: 2015-02-27 Functions: 53 54 98.1 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 424 533 79.5 %

Function Name Sort by function name Hit count Sort by hit count
GEN2mpz 121220622
addiispec 1258197194
adduispec 1059186789
adduispec_offset 319325561
addumului 1097511
affir 126060414
cmpiispec 1816155205
convi 464727
diviiexact 349888014
divis 39754
divis_rem 38330521
diviu_rem 126781269
diviuexact 342047629
diviuuexact 72723
divri 13691314
divri_with_gmp 3121854
divrr 90423187
divrr_with_gmp 16394766
dvmdii 684249056
equaliispec 28804307
floorr 488499
icopy_ef 12578917
incloop 21468357
incneg 5384
incpos 21498559
int_normalize 137370397
mantissa2nr 19465478
mpz2GEN 111561759
muliispec 1274718379
muliispec_mirror 55211819
muluispec 1424869012
muluui 94931
pari_gmp_free 3006
pari_gmp_realloc 0
pari_kernel_close 1216
pari_kernel_init 1724
red_montgomery 6135467
remi2n 10117789
resetloop 145608
roundr_up_ip 110624092
setloop 1475896
shiftispec 226901822
sqrispec 601875536
sqrispec_mirror 6872058
sqrtr_abs 16004280
sqrtremi 1402838
subiispec 1597563055
subiuspec 962420672
truncr 482464
umodiu 579623232
xmpn_copy 1195288
xmpn_mirror 195852840
xmpn_mirrorcopy 205687174
xmpn_zero 35520900

Generated by: LCOV version 1.9