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 18609-ea8a867) Lines: 641 716 89.5 %
Date: 2016-02-13 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 159879061
addiispec 1387481722
adduispec 1143907595
adduispec_offset 319782856
addumului 1097897
affir 136353172
cmpiispec 1970392198
convi 475734
diviiexact 287031536
divis 331697
divis_rem 42538028
diviu_rem 123315530
diviuexact 277483259
diviuuexact 381681
divri 17335267
divri_with_gmp 3564833
divrr 106966467
divrr_with_gmp 30345607
dvmdii 731498372
equaliispec 32942886
floorr 510084
icopy_ef 18752644
incloop 30907239
incneg 6184
incpos 30915900
int_normalize 130725289
mantissa2nr 23344046
mpz2GEN 143838112
muliispec 1453637380
muliispec_mirror 60947461
muluispec 1656616191
muluui 403889
pari_gmp_free 7443
pari_gmp_realloc 0
pari_kernel_close 1264
pari_kernel_init 1772
red_montgomery 6272610
remi2n 10703678
resetloop 145648
roundr_up_ip 175542199
setloop 2195436
shiftispec 283739043
sqrispec 603933509
sqrispec_mirror 4206799
sqrtr_abs 22000007
sqrtremi 1688875
subiispec 1705153311
subiuspec 1050939734
truncr 744056
umodiu 668785610
xmpn_copy 1246043
xmpn_mirror 212457782
xmpn_mirrorcopy 266487750
xmpn_zero 55910447

Generated by: LCOV version 1.9