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 20091-343fe20) Lines: 1347 1536 87.7 %
Date: 2017-01-20 05:50:06 Functions: 137 148 92.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_pval 1345326
Q_pvalrem 371737
RgX_to_ser 978470
RgX_to_ser_inexact 339802
ZV_Z_dvd 91
ZV_lval 0
ZV_lvalrem 0
ZV_pval 2730
ZV_pvalrem 93545
ZX_lval 28
ZX_lvalrem 0
ZX_pval 6307
ZX_pvalrem 530306
Z_lval 10212670
Z_lvalrem 7348587
Z_lvalrem_stop 472248900
Z_pval 6208725
Z_pvalrem 5107567
Z_pvalrem_DC 1360748
_domul 67884
cgetp 1533042
closure_identical 28
cmp_str 476
cmp_universal 46332426
cmp_universal_rec 25980969
cmpfrac 39965
cmpgen 42
cmpifrac 11424
cmprfrac 35840
col_test 84
croak 0
ctop 14
cvstop2 0
cvtop 44984
cvtop2 263190
ensure_nb 786023
factorial_lval 65734
gabs 7878927
gaffect 245878
gaffsg 1008
gassoc_proto 105067
gcmp 155080538
gcmpsg 24107
gcvtop 28
gen_2val 490
gen_2valrem 292114
gen_Z_divides 3836
gen_lval 6891
gen_lvalrem 623815
gen_pval 9037
gen_pvalrem 623851
gen_pvalrem_DC 6305
gen_z_divides 2492
gequal 59470377
gequal0 395249674
gequal1 143189346
gequalX 237048
gequal_try 1728106
gequalm1 1159784
gequalsg 22827
gexpo 65287544
gidentical 35428458
gisexactzero 43303154
glength 4405305
gmax 7830166
gmaxgs 0
gmin 91382
gmings 0
gneg 190714521
gneg_i 39088233
gpvaluation 3661
greffe_aux 1318265
gsigne 2715596
gtolist 410
gtolong 77
gvaluation 195398
identicalrr 21
intdvd 91
is_monomial_test 13078167
is_negative 0
isexactzero 195927968
isless_iu 170237187
isrationalzero 276680093
lexcmp 22929039
lexcmp_s_matvec 21
lexcmp_scal_matvec 224
lexcmp_scal_vecsmall 28
lexcmp_similar 10794
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 3585671
map_proto_lGL 126
mat_test 98
matsize 112
minval 224
mklist 687
mklist_typ 729
mklistcopy 49
mkmap 35
normalize 5889583
normalizepol 95496
normalizepol_approx 665
normalizepol_lg 164431182
padic_to_Fl 77
padic_to_Fp 3892
padicaff0 0
polequal 433327
polidentical 749824
qtop 14
quadtofp 112
ratval 57148
rfrac_to_ser 133
rfracrecip_to_ser_absolute 91
roughtype 45858407
serequal 308
seridentical 14
sizedigit 7
u_lval 9477848
u_lvalrem 11977896
u_lvalrem_stop 405415239
u_pval 2072
u_pvalrem 380373
vecequal 1112659
vecidentical 3655631
vecindexmax 5786
vecindexmin 5653
vecmax 1692
vecmax0 1832
vecmin 5625
vecmin0 5695
z_lval 196221
z_lvalrem 0
z_pval 41699
z_pvalrem 0

Generated by: LCOV version 1.11