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 17908-5dc2363) Lines: 641 716 89.5 %
Date: 2015-07-01 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 128536871
addiispec 1310854138
adduispec 1079251998
adduispec_offset 326214050
addumului 1097618
affir 132203251
cmpiispec 1853328677
convi 467080
diviiexact 355109716
divis 262590
divis_rem 40228922
diviu_rem 126774645
diviuexact 345656263
diviuuexact 220592
divri 15791506
divri_with_gmp 3559313
divrr 94653516
divrr_with_gmp 19842786
dvmdii 710631614
equaliispec 29147073
floorr 488569
icopy_ef 18089350
incloop 21572434
incneg 6184
incpos 21586645
int_normalize 138088289
mantissa2nr 20949006
mpz2GEN 116995426
muliispec 1344307394
muliispec_mirror 60416120
muluispec 1489492524
muluui 242800
pari_gmp_free 3014
pari_gmp_realloc 0
pari_kernel_close 1240
pari_kernel_init 1748
red_montgomery 6267811
remi2n 10344837
resetloop 145648
roundr_up_ip 123123215
setloop 1514268
shiftispec 238602145
sqrispec 591529180
sqrispec_mirror 4042093
sqrtr_abs 18417236
sqrtremi 1405128
subiispec 1625062228
subiuspec 979417170
truncr 482551
umodiu 597469742
xmpn_copy 1233432
xmpn_mirror 205686173
xmpn_mirrorcopy 228048234
xmpn_zero 41819335

Generated by: LCOV version 1.9