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.8.0 lcov report (development 19619-c9e92b8) Lines: 1323 1531 86.4 %
Date: 2016-09-29 05:54:10 Functions: 134 145 92.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_pval 1353331
Q_pvalrem 314892
RgX_to_ser 929705
RgX_to_ser_inexact 335056
ZV_Z_dvd 77
ZV_lval 0
ZV_lvalrem 0
ZV_pval 2758
ZV_pvalrem 94750
ZX_lval 28
ZX_lvalrem 0
ZX_pval 6307
ZX_pvalrem 529154
Z_lval 10640844
Z_lvalrem 7250694
Z_lvalrem_stop 479709418
Z_pval 6637473
Z_pvalrem 4997000
Z_pvalrem_DC 1357627
_domul 70761
cgetp 1492172
closure_identical 28
cmp_str 476
cmp_universal 46141872
cmp_universal_rec 25932249
cmpfrac 51682
cmpgen 42
cmpifrac 16525
cmprfrac 35840
col_test 84
croak 0
ctop 14
cvstop2 0
cvtop 37755
cvtop2 245176
ensure_nb 786023
factorial_lval 65621
gabs 8054716
gaffect 246200
gaffsg 980
gassoc_proto 101902
gcmp 150572553
gcmpsg 24408
gcvtop 28
gen_2val 483
gen_2valrem 275569
gen_Z_divides 3836
gen_lval 6919
gen_lvalrem 623868
gen_pval 9065
gen_pvalrem 623904
gen_pvalrem_DC 6305
gen_z_divides 2492
gequal 52841078
gequal0 393681293
gequal1 143508141
gequalX 176015
gequal_try 1719489
gequalm1 1193799
gequalsg 22953
gexpo 67445577
gidentical 35520824
gisexactzero 43264466
glength 4397031
gmax 7830131
gmaxgs 0
gmin 90750
gmings 0
gneg 190531572
gneg_i 39005327
gpvaluation 3661
greffe_aux 1264740
gsigne 3167804
gtolist 410
gtolong 77
gvaluation 205037
identicalrr 21
intdvd 91
is_monomial_test 13069279
is_negative 0
isexactzero 196330903
isless_iu 170924765
isrationalzero 275792461
lexcmp 87008
lexcmp_s_matvec 21
lexcmp_scal_matvec 224
lexcmp_scal_vecsmall 28
lexcmp_similar 29404
lexcmp_vec_mat 84
lexcmp_vecsmall_mat 42
lexcmp_vecsmall_other 182
lexcmp_vecsmall_vec 154
lexcmpgs 28
lexcmpsg 329
list_cmp 336
listcreate 687
listcreate_typ 729
listinsert 35014
listkill 7
listpop 21910
listpop0 35
listput 751051
listput0 700049
listsort 21
map_proto_G 182
map_proto_lG 3702777
map_proto_lGL 126
mat_test 98
matsize 112
minval 224
mklistcopy 49
normalize 5607794
normalizepol 94902
normalizepol_approx 665
normalizepol_lg 166119808
padic_to_Fl 77
padic_to_Fp 3822
padicaff0 0
polequal 431687
polidentical 763510
qtop 14
quadtofp 112
ratval 58415
rfrac_to_ser 133
roughtype 174345
serequal 294
seridentical 14
sizedigit 7
u_lval 7515421
u_lvalrem 10139656
u_lvalrem_stop 415757905
u_pval 1610
u_pvalrem 380355
vecequal 760997
vecidentical 3649380
vecindexmax 5702
vecindexmin 5562
vecmax 1608
vecmax0 1748
vecmin 5534
vecmin0 5604
z_lval 173123
z_lvalrem 0
z_pval 18209
z_pvalrem 0

Generated by: LCOV version 1.11