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 20422-b487f4d) Lines: 1345 1535 87.6 %
Date: 2017-03-22 05:51:54 Functions: 137 148 92.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_pval 1343591
Q_pvalrem 420780
RgX_to_ser 763136
RgX_to_ser_inexact 339851
ZV_Z_dvd 147
ZV_lval 0
ZV_lvalrem 0
ZV_pval 2828
ZV_pvalrem 89807
ZX_lval 28
ZX_lvalrem 0
ZX_pval 6307
ZX_pvalrem 531888
Z_lval 10222838
Z_lvalrem 7392717
Z_lvalrem_stop 475738666
Z_pval 6215660
Z_pvalrem 5161166
Z_pvalrem_DC 1362209
_domul 68023
cgetp 1532867
closure_identical 28
cmp_str 476
cmp_universal 45960810
cmp_universal_rec 26155388
cmpfrac 39972
cmpgen 42
cmpifrac 11438
cmprfrac 35805
col_test 84
croak 0
ctop 14
cvstop2 0
cvtop 45036
cvtop2 263005
ensure_nb 786023
factorial_lval 65909
gabs 8071772
gaffect 245878
gaffsg 1008
gassoc_proto 100592
gcmp 155179704
gcmpsg 24184
gcvtop 28
gen_2val 490
gen_2valrem 293003
gen_Z_divides 3850
gen_lval 6989
gen_lvalrem 621659
gen_pval 9135
gen_pvalrem 621695
gen_pvalrem_DC 6326
gen_z_divides 2499
gequal 57142854
gequal0 388143130
gequal1 146398829
gequalX 836255
gequal_try 1711313
gequalm1 1167652
gequalsg 22827
gexpo 67696997
gidentical 35658289
gisexactzero 42900207
glength 4460374
gmax 7832161
gmaxgs 0
gmin 89429
gmings 0
gneg 190477039
gneg_i 38370224
gpvaluation 3661
greffe_aux 1102980
gsigne 2962712
gtolist 410
gtolong 77
gvaluation 195440
identicalrr 21
intdvd 91
is_monomial_test 13082230
is_negative 0
isexactzero 198612733
isless_iu 172154358
isrationalzero 276169085
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 3637556
map_proto_lGL 126
mat_test 98
matsize 112
minval 224
mklist 687
mklist_typ 729
mklistcopy 49
mkmap 35
normalize 5525121
normalizepol 98966
normalizepol_approx 665
normalizepol_lg 165823645
padic_to_Fl 77
padic_to_Fp 3892
padicaff0 0
polequal 435574
polidentical 749880
qtop 14
quadtofp 112
ratval 57344
rfrac_to_ser 224
rfracrecip_to_ser_absolute 112
roughtype 9786973
serequal 308
seridentical 14
sizedigit 7
u_lval 9509081
u_lvalrem 11937165
u_lvalrem_stop 407269093
u_pval 2072
u_pvalrem 380576
vecequal 1148204
vecidentical 3655491
vecindexmax 5786
vecindexmin 5786
vecmax 1692
vecmax0 1832
vecmin 5758
vecmin0 5828
z_lval 320792
z_lvalrem 0
z_pval 41699
z_pvalrem 0

Generated by: LCOV version 1.11