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 20459-9710128) Lines: 1345 1535 87.6 %
Date: 2017-04-29 05:33:44 Functions: 137 148 92.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_pval 1151460
Q_pvalrem 362148
RgX_to_ser 661260
RgX_to_ser_inexact 291414
ZV_Z_dvd 126
ZV_lval 0
ZV_lvalrem 0
ZV_pval 2424
ZV_pvalrem 76902
ZX_lval 24
ZX_lvalrem 0
ZX_pval 5406
ZX_pvalrem 455904
Z_lval 8739564
Z_lvalrem 6086842
Z_lvalrem_stop 403337951
Z_pval 5303034
Z_pvalrem 4264819
Z_pvalrem_DC 1116498
_domul 58236
cgetp 1315369
closure_identical 24
cmp_str 408
cmp_universal 39394980
cmp_universal_rec 22418904
cmpfrac 34260
cmpgen 36
cmpifrac 9804
cmprfrac 30690
col_test 72
croak 0
ctop 12
cvstop2 0
cvtop 38637
cvtop2 226948
ensure_nb 673734
factorial_lval 56496
gabs 6922518
gaffect 187662
gaffsg 864
gassoc_proto 86535
gcmp 133401270
gcmpsg 20706
gcvtop 24
gen_2val 420
gen_2valrem 251070
gen_Z_divides 3300
gen_lval 6072
gen_lvalrem 532800
gen_pval 7830
gen_pvalrem 532806
gen_pvalrem_DC 5430
gen_z_divides 2142
gequal 48926770
gequal0 325043177
gequal1 122152825
gequalX 716790
gequal_try 1415394
gequalm1 1009602
gequalsg 19566
gexpo 57743350
gidentical 30535541
gisexactzero 35209112
glength 3823138
gmax 6713316
gmaxgs 0
gmin 76626
gmings 0
gneg 163282772
gneg_i 32075786
gpvaluation 3138
greffe_aux 952668
gsigne 2468427
gtolist 352
gtolong 66
gvaluation 167520
identicalrr 18
intdvd 78
is_monomial_test 10581651
is_negative 0
isexactzero 163270336
isless_iu 120518302
isrationalzero 231851147
lexcmp 4194276
lexcmp_s_matvec 18
lexcmp_scal_matvec 192
lexcmp_scal_vecsmall 24
lexcmp_similar 9282
lexcmp_vec_mat 72
lexcmp_vecsmall_mat 36
lexcmp_vecsmall_other 156
lexcmp_vecsmall_vec 132
lexcmpgs 24
lexcmpsg 282
list_cmp 288
listcreate_gp 6
listinsert 30012
listkill 6
listpop 18780
listpop0 30
listput 643758
listput0 600042
listsort 18
map_proto_G 156
map_proto_lG 3518880
map_proto_lGL 108
mat_test 84
matsize 96
minval 192
mklist 590
mklist_typ 626
mklistcopy 42
mkmap 30
normalize 4776654
normalizepol 85242
normalizepol_approx 570
normalizepol_lg 137470493
padic_to_Fl 66
padic_to_Fp 3336
padicaff0 0
polequal 373392
polidentical 636840
qtop 12
quadtofp 96
ratval 49152
rfrac_to_ser 192
rfracrecip_to_ser_absolute 96
roughtype 8388834
serequal 264
seridentical 12
sizedigit 6
u_lval 8374205
u_lvalrem 10345037
u_lvalrem_stop 373531676
u_pval 1776
u_pvalrem 326208
vecequal 984510
vecidentical 3133278
vecindexmax 4962
vecindexmin 4968
vecmax 1452
vecmax0 1572
vecmin 4944
vecmin0 5004
z_lval 270308
z_lvalrem 0
z_pval 35742
z_pvalrem 0

Generated by: LCOV version 1.11