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 20095-ff095b1) Lines: 639 716 89.2 %
Date: 2017-01-21 05:50:01 Functions: 53 54 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
GEN2mpz 238072875
addiispec 1481028807
adduispec 1125126792
adduispec_offset 319541447
addumului 759653
affir 106641120
cmpiispec 1802821974
convi 489689
diviiexact 246047275
divis 461120
divis_rem 30127787
diviu_rem 125759484
diviuexact 259030283
diviuuexact 529479
divri 17918924
divri_with_gmp 3575066
divrr 83960221
divrr_with_gmp 32807184
dvmdii 811908541
equaliispec 56873389
floorr 460459
icopy_ef 19344334
incloop 32550448
incneg 6188
incpos 32545323
int_normalize 145330657
mantissa2nr 22421081
mpz2GEN 227428498
muliispec 2037027774
muliispec_mirror 63828476
muluispec 2103674210
muluui 551687
pari_gmp_free 202545
pari_gmp_realloc 0
pari_kernel_close 1312
pari_kernel_init 804
red_montgomery 6722433
remi2n 10266396
resetloop 156748
roundr_up_ip 267991857
setloop 2417637
shiftispec 338381937
sqrispec 681224310
sqrispec_mirror 4927367
sqrtr_abs 22362241
sqrtremi 2676960
subiispec 1417722633
subiuspec 787881606
truncr 1497195
umodiu 778995466
xmpn_copy 1274780
xmpn_mirror 187008126
xmpn_mirrorcopy 280305130
xmpn_zero 58744491

Generated by: LCOV version 1.11