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 16962-5a32637) Lines: 641 716 89.5 %
Date: 2014-10-29 Functions: 53 54 98.1 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 421 533 79.0 %

Function Name Sort by function name Hit count Sort by hit count
GEN2mpz 98938477
addiispec 1082055879
adduispec 929134471
adduispec_offset 286387143
addumului 989679
affir 100321884
cmpiispec 1475623356
convi 327373
diviiexact 313022198
divis 24061
divis_rem 35311787
diviu_rem 108521458
diviuexact 304562005
diviuuexact 72723
divri 13568662
divri_with_gmp 3069253
divrr 74190328
divrr_with_gmp 14420132
dvmdii 532519070
equaliispec 22188872
floorr 375064
icopy_ef 7553826
incloop 17255462
incneg 5384
incpos 17241338
int_normalize 130080643
mantissa2nr 15369694
mpz2GEN 90305944
muliispec 1055938843
muliispec_mirror 54440281
muluispec 1170744494
muluui 94931
pari_gmp_free 2994
pari_gmp_realloc 0
pari_kernel_close 688
pari_kernel_init 700
red_montgomery 5321508
remi2n 7180171
resetloop 145468
roundr_up_ip 83567817
setloop 1464719
shiftispec 197992994
sqrispec 569955599
sqrispec_mirror 6697595
sqrtr_abs 11917435
sqrtremi 1396911
subiispec 1304428607
subiuspec 833764687
truncr 385938
umodiu 411067786
xmpn_copy 1658068
xmpn_mirror 167071478
xmpn_mirrorcopy 190778406
xmpn_zero 29406820

Generated by: LCOV version 1.9