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 16741-1378b1c) Lines: 641 716 89.5 %
Date: 2014-08-17 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 50919884
addiispec 545163012
adduispec 423356465
adduispec_offset 136018678
addumului 624470
affir 52080985
cmpiispec 759070573
convi 174329
diviiexact 109320315
divis 12169
divis_rem 17997930
diviu_rem 70756274
diviuexact 103178206
diviuuexact 26598
divri 7151570
divri_with_gmp 1897474
divrr 37893678
divrr_with_gmp 9079692
dvmdii 274633175
equaliispec 11692226
floorr 219162
icopy_ef 4358874
incloop 10222040
incneg 2704
incpos 10214954
int_normalize 63295910
mantissa2nr 8426682
mpz2GEN 45327116
muliispec 592089685
muliispec_mirror 68677788
muluispec 593795502
muluui 37702
pari_gmp_free 1016
pari_gmp_realloc 0
pari_kernel_close 332
pari_kernel_init 332
red_montgomery 1769788
remi2n 3855263
resetloop 72742
roundr_up_ip 45370290
setloop 732378
shiftispec 106163225
sqrispec 287557426
sqrispec_mirror 6707465
sqrtr_abs 6310124
sqrtremi 701035
subiispec 677110894
subiuspec 371569115
truncr 216102
umodiu 174772194
xmpn_copy 1216872
xmpn_mirror 130528790
xmpn_mirrorcopy 188607957
xmpn_zero 17287290

Generated by: LCOV version 1.9