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 20924-e159ed0) Lines: 1345 1535 87.6 %
Date: 2017-08-21 06:23:16 Functions: 137 148 92.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_pval 1393088
Q_pvalrem 438402
RgX_to_ser 718811
RgX_to_ser_inexact 350750
ZV_Z_dvd 217
ZV_lval 0
ZV_lvalrem 0
ZV_pval 6454
ZV_pvalrem 107048
ZX_lval 28
ZX_lvalrem 0
ZX_pval 6307
ZX_pvalrem 534961
Z_lval 10757541
Z_lvalrem 7684431
Z_lvalrem_stop 445945727
Z_pval 6749644
Z_pvalrem 5381945
Z_pvalrem_DC 1364578
_domul 579947
cgetp 1555051
closure_identical 28
cmp_str 476
cmp_universal 46033953
cmp_universal_rec 26187175
cmpfrac 39839
cmpgen 42
cmpifrac 11473
cmprfrac 35805
col_test 2023
croak 0
ctop 14
cvstop2 0
cvtop 46728
cvtop2 281642
ensure_nb 786023
factorial_lval 66336
gabs 9227657
gaffect 245878
gaffsg 1008
gassoc_proto 708749
gcmp 178730944
gcmpsg 24184
gcvtop 28
gen_2val 3920
gen_2valrem 299051
gen_Z_divides 3962
gen_lval 10615
gen_lvalrem 641973
gen_pval 12761
gen_pvalrem 642009
gen_pvalrem_DC 6466
gen_z_divides 2541
gequal 196264808
gequal0 563536644
gequal1 156445262
gequalX 1043602
gequal_try 1719175
gequalm1 1207233
gequalsg 25389
gexpo 85302308
gidentical 33539185
gisexactzero 48265395
glength 4474517
gmax 7832420
gmaxgs 0
gmin 91718
gmings 0
gneg 195087066
gneg_i 49699609
gpvaluation 3661
greffe_aux 1069547
gsigne 3455486
gtolist 418
gtolong 77
gvaluation 198201
identicalrr 21
intdvd 91
is_monomial_test 13139998
is_negative 0
isexactzero 209188065
isless_iu 170951988
isrationalzero 254186280
lexcmp 6065646
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 20333616
map_proto_lGL 126
mat_test 98
matsize 112
minval 231
mklist 703
mklist_typ 745
mklistcopy 49
mkmap 35
normalize 5331010
normalizepol 115709
normalizepol_approx 60942
normalizepol_lg 194353657
padic_to_Fl 77
padic_to_Fp 4193
padicaff0 0
polequal 5850969
polidentical 610772
qtop 14
quadtofp 112
ratval 84336
rfrac_to_ser 224
rfracrecip_to_ser_absolute 112
roughtype 12131621
serequal 308
seridentical 14
sizedigit 7
u_lval 10183351
u_lvalrem 12226855
u_lvalrem_stop 390800013
u_pval 2072
u_pvalrem 382900
vecequal 3070102
vecidentical 3656051
vecindexmax 6479
vecindexmin 8243
vecmax 2385
vecmax0 2525
vecmin 8215
vecmin0 8285
z_lval 344949
z_lvalrem 0
z_pval 42098
z_pvalrem 0

Generated by: LCOV version 1.11