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 - basemath - gen2.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 17961-e5c317c) Lines: 1302 1488 87.5 %
Date: 2015-09-04 Functions: 131 144 91.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1092 1405 77.7 %

Function Name Sort by function name Hit count Sort by hit count
Q_pval 271267
Q_pvalrem 4102
RgX_to_ser 146709
RgX_to_ser_inexact 278335
ZV_Z_dvd 49
ZV_lval 0
ZV_lvalrem 0
ZV_pval 959
ZV_pvalrem 1974
ZX_lval 0
ZX_lvalrem 0
ZX_pval 5474
ZX_pvalrem 529984
Z_lval 5300469
Z_lvalrem 6742311
Z_lvalrem_stop 481903806
Z_pval 4616600
Z_pvalrem 4514877
Z_pvalrem_DC 1207523
_domul 67205
cgetp 975419
closure_identical 28
cmp_str 84
cmp_universal 2920729
cmp_universal_rec 1011535
cmpfrac 50986
cmpgen 42
cmpifrac 16128
cmprfrac 35427
col_test 84
croak 0
ctop 14
cvstop2 0
cvtop 21656
cvtop2 171009
ensure_nb 786177
factorial_lval 65076
gabs 7201841
gaffect 246326
gaffsg 1064
gassoc_proto 78592
gcmp 146179346
gcmpsg 21398
gcvtop 0
gen_2val 301
gen_2valrem 266987
gen_Z_divides 3892
gen_lval 4245
gen_lvalrem 531922
gen_pval 6433
gen_pvalrem 531958
gen_pvalrem_DC 6388
gen_z_divides 2520
gequal 44120833
gequal0 352045178
gequal1 142735576
gequalX 63067
gequal_try 1569182
gequalm1 377234
gequalsg 22911
gexpo 52755120
gidentical 3452791
glength 3833447
gmax 7830131
gmaxgs 0
gmin 76983
gmings 0
gneg 170056822
gneg_i 37054581
gpvaluation 3416
greffe_aux 425044
gsigne 2486663
gtolist 406
gtolong 77
gvaluation 10276
identicalrr 21
intdvd 91
is_monomial_test 13081119
is_negative 0
isexactzero 177994133
isless_iu 173954862
isrationalzero 266336720
lexcmp 71084
lexcmp_s_matvec 21
lexcmp_scal_matvec 224
lexcmp_scal_vecsmall 28
lexcmp_similar 26642
lexcmp_vec_mat 84
lexcmp_vecsmall_mat 42
lexcmp_vecsmall_other 182
lexcmp_vecsmall_vec 154
lexcmpgs 28
lexcmpsg 329
list_cmp 336
listcreate 665
listcreate_typ 742
listinsert 35014
listkill 7
listpop 21903
listpop0 35
listput 751205
listput0 700049
listsort 21
map_proto_G 182
map_proto_lG 3609981
map_proto_lGL 126
mat_test 98
matsize 105
minval 175
mklistcopy 49
normalize 1756345
normalizepol 90281
normalizepol_approx 3788
normalizepol_lg 156781451
padic_to_Fl 77
padic_to_Fp 56
padicaff0 0
polequal 366475
polidentical 20991
qtop 14
quadtofp 112
ratval 56994
rfrac_to_ser 133
roughtype 142497
serequal 14
seridentical 14
sizedigit 7
u_lval 4384835
u_lvalrem 9986208
u_lvalrem_stop 364959637
u_pval 1036
u_pvalrem 382410
vecequal 427269
vecidentical 427
vecindexmax 5331
vecindexmin 392
vecmax 1251
vecmax0 1377
vecmin 364
vecmin0 434
z_lval 72339
z_lvalrem 0
z_pval 1491
z_pvalrem 0

Generated by: LCOV version 1.9