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 17953-c39f2e6) Lines: 641 716 89.5 %
Date: 2015-08-31 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 149080293
addiispec 1367724543
adduispec 1130240937
adduispec_offset 326981508
addumului 1097606
affir 132463352
cmpiispec 1912724522
convi 468458
diviiexact 371107048
divis 265654
divis_rem 40255729
diviu_rem 127118483
diviuexact 366236851
diviuuexact 220700
divri 15791516
divri_with_gmp 3559320
divrr 94907230
divrr_with_gmp 19911364
dvmdii 726892925
equaliispec 31422317
floorr 488569
icopy_ef 18205419
incloop 30943433
incneg 6184
incpos 30970026
int_normalize 146075738
mantissa2nr 21497437
mpz2GEN 137525070
muliispec 1408439823
muliispec_mirror 60416120
muluispec 1586704579
muluui 242908
pari_gmp_free 7387
pari_gmp_realloc 0
pari_kernel_close 1244
pari_kernel_init 1752
red_montgomery 6274466
remi2n 10571701
resetloop 145648
roundr_up_ip 161004431
setloop 2176311
shiftispec 276529284
sqrispec 596270849
sqrispec_mirror 4042093
sqrtr_abs 18913391
sqrtremi 1654564
subiispec 1659732641
subiuspec 1011993474
truncr 730471
umodiu 642137259
xmpn_copy 1235824
xmpn_mirror 206245725
xmpn_mirrorcopy 229193763
xmpn_zero 42384075

Generated by: LCOV version 1.9