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 - basemath - gen2.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.10.0 lcov report (development 20777-d2a9243) Lines: 1345 1535 87.6 %
Date: 2017-06-25 05:59:24 Functions: 137 148 92.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_pval 1392311
Q_pvalrem 441508
RgX_to_ser 718776
RgX_to_ser_inexact 350743
ZV_Z_dvd 217
ZV_lval 0
ZV_lvalrem 0
ZV_pval 6328
ZV_pvalrem 107048
ZX_lval 28
ZX_lvalrem 0
ZX_pval 6307
ZX_pvalrem 535129
Z_lval 10590120
Z_lvalrem 7676190
Z_lvalrem_stop 480139880
Z_pval 6582223
Z_pvalrem 5374605
Z_pvalrem_DC 1364967
_domul 608360
cgetp 1553921
closure_identical 28
cmp_str 476
cmp_universal 46028605
cmp_universal_rec 26185957
cmpfrac 39734
cmpgen 42
cmpifrac 11438
cmprfrac 35805
col_test 2023
croak 0
ctop 14
cvstop2 0
cvtop 48177
cvtop2 281520
ensure_nb 786023
factorial_lval 66406
gabs 8815196
gaffect 245878
gaffsg 1008
gassoc_proto 756214
gcmp 179185581
gcmpsg 24184
gcvtop 28
gen_2val 3920
gen_2valrem 299219
gen_Z_divides 3962
gen_lval 10489
gen_lvalrem 642141
gen_pval 12635
gen_pvalrem 642177
gen_pvalrem_DC 6466
gen_z_divides 2541
gequal 143545547
gequal0 545269352
gequal1 149008935
gequalX 1043245
gequal_try 1737683
gequalm1 1190683
gequalsg 28931
gexpo 80836374
gidentical 35694619
gisexactzero 43027631
glength 4472739
gmax 7832420
gmaxgs 0
gmin 90584
gmings 0
gneg 188579045
gneg_i 44003550
gpvaluation 3661
greffe_aux 1069505
gsigne 3090747
gtolist 418
gtolong 77
gvaluation 195671
identicalrr 21
intdvd 91
is_monomial_test 13128440
is_negative 0
isexactzero 206643577
isless_iu 174988363
isrationalzero 296330063
lexcmp 6066571
lexcmp_s_matvec 21
lexcmp_scal_matvec 224
lexcmp_scal_vecsmall 28
lexcmp_similar 10829
lexcmp_vec_mat 84
lexcmp_vecsmall_mat 42
lexcmp_vecsmall_other 182
lexcmp_vecsmall_vec 154
lexcmpgs 28
lexcmpsg 329
list_cmp 336
listcreate_gp 7
listinsert 35014
listkill 7
listpop 21910
listpop0 35
listput 751051
listput0 700049
listsort 21
map_proto_G 182
map_proto_lG 20957009
map_proto_lGL 126
mat_test 98
matsize 112
minval 224
mklist 703
mklist_typ 745
mklistcopy 49
mkmap 35
normalize 5330457
normalizepol 112810
normalizepol_approx 665
normalizepol_lg 193289532
padic_to_Fl 77
padic_to_Fp 3892
padicaff0 0
polequal 438304
polidentical 749880
qtop 14
quadtofp 112
ratval 84336
rfrac_to_ser 224
rfracrecip_to_ser_absolute 112
roughtype 12133471
serequal 308
seridentical 14
sizedigit 7
u_lval 10037522
u_lvalrem 12252358
u_lvalrem_stop 410671129
u_pval 2072
u_pvalrem 383026
vecequal 2862343
vecidentical 3655855
vecindexmax 6444
vecindexmin 8243
vecmax 2350
vecmax0 2490
vecmin 8215
vecmin0 8285
z_lval 324145
z_lvalrem 0
z_pval 41916
z_pvalrem 0

Generated by: LCOV version 1.11