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 20277-2bd9113) Lines: 1346 1536 87.6 %
Date: 2017-02-21 05:49:51 Functions: 137 148 92.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_pval 1337661
Q_pvalrem 371696
RgX_to_ser 971841
RgX_to_ser_inexact 339844
ZV_Z_dvd 91
ZV_lval 0
ZV_lvalrem 0
ZV_pval 2723
ZV_pvalrem 93293
ZX_lval 28
ZX_lvalrem 0
ZX_pval 6307
ZX_pvalrem 530306
Z_lval 10209505
Z_lvalrem 7351639
Z_lvalrem_stop 475165101
Z_pval 6205503
Z_pvalrem 5110802
Z_pvalrem_DC 1360637
_domul 67891
cgetp 1533001
closure_identical 28
cmp_str 476
cmp_universal 45715012
cmp_universal_rec 26005371
cmpfrac 39965
cmpgen 42
cmpifrac 11431
cmprfrac 35805
col_test 84
croak 0
ctop 14
cvstop2 0
cvtop 44993
cvtop2 263158
ensure_nb 786023
factorial_lval 65734
gabs 8066183
gaffect 245878
gaffsg 1008
gassoc_proto 105027
gcmp 155146941
gcmpsg 24184
gcvtop 28
gen_2val 490
gen_2valrem 292114
gen_Z_divides 3836
gen_lval 6884
gen_lvalrem 623563
gen_pval 9030
gen_pvalrem 623599
gen_pvalrem_DC 6305
gen_z_divides 2492
gequal 57150061
gequal0 400013088
gequal1 148010355
gequalX 826504
gequal_try 1719321
gequalm1 1167356
gequalsg 22827
gexpo 67486500
gidentical 35436449
gisexactzero 43259726
glength 4459898
gmax 7830173
gmaxgs 0
gmin 89345
gmings 0
gneg 191442569
gneg_i 38647541
gpvaluation 3661
greffe_aux 1311678
gsigne 2962180
gtolist 410
gtolong 77
gvaluation 195398
identicalrr 21
intdvd 91
is_monomial_test 13077054
is_negative 0
isexactzero 201633912
isless_iu 171751273
isrationalzero 279240412
lexcmp 4893322
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 3689495
map_proto_lGL 126
mat_test 98
matsize 112
minval 224
mklist 687
mklist_typ 729
mklistcopy 49
mkmap 35
normalize 5885222
normalizepol 100812
normalizepol_approx 665
normalizepol_lg 168203322
padic_to_Fl 77
padic_to_Fp 3892
padicaff0 0
polequal 435574
polidentical 749873
qtop 14
quadtofp 112
ratval 57148
rfrac_to_ser 133
rfracrecip_to_ser_absolute 112
roughtype 9786973
serequal 308
seridentical 14
sizedigit 7
u_lval 9473147
u_lvalrem 11998657
u_lvalrem_stop 407440292
u_pval 2072
u_pvalrem 380373
vecequal 1114745
vecidentical 3655631
vecindexmax 5786
vecindexmin 5814
vecmax 1692
vecmax0 1832
vecmin 5786
vecmin0 5856
z_lval 196515
z_lvalrem 0
z_pval 41699
z_pvalrem 0

Generated by: LCOV version 1.11