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 19217-a6dcf64) Lines: 1324 1531 86.5 %
Date: 2016-07-27 07:10:32 Functions: 134 145 92.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_pval 1570439
Q_pvalrem 158898
RgX_to_ser 869110
RgX_to_ser_inexact 334587
ZV_Z_dvd 49
ZV_lval 0
ZV_lvalrem 0
ZV_pval 79345
ZV_pvalrem 4473
ZX_lval 28
ZX_lvalrem 0
ZX_pval 6307
ZX_pvalrem 522823
Z_lval 10758798
Z_lvalrem 6775722
Z_lvalrem_stop 476724756
Z_pval 6758150
Z_pvalrem 4540939
Z_pvalrem_DC 1375251
_domul 74926
cgetp 1015372
closure_identical 28
cmp_str 476
cmp_universal 46114943
cmp_universal_rec 25921784
cmpfrac 53551
cmpgen 42
cmpifrac 15400
cmprfrac 35805
col_test 84
croak 0
ctop 14
cvstop2 0
cvtop 29031
cvtop2 195264
ensure_nb 785799
factorial_lval 64642
gabs 7932023
gaffect 246200
gaffsg 980
gassoc_proto 104631
gcmp 150299406
gcmpsg 24408
gcvtop 21
gen_2val 588
gen_2valrem 266497
gen_Z_divides 3836
gen_lval 83506
gen_lvalrem 527260
gen_pval 85652
gen_pvalrem 527296
gen_pvalrem_DC 6305
gen_z_divides 2492
gequal 54030155
gequal0 405345476
gequal1 144971456
gequalX 173646
gequal_try 1719577
gequalm1 1168505
gequalsg 22960
gexpo 65028425
gidentical 34935764
gisexactzero 43558188
glength 4358496
gmax 7830131
gmaxgs 0
gmin 89649
gmings 0
gneg 190884345
gneg_i 38928040
gpvaluation 3605
greffe_aux 1203676
gsigne 2989702
gtolist 410
gtolong 77
gvaluation 12278
identicalrr 21
intdvd 91
is_monomial_test 13073652
is_negative 0
isexactzero 198090126
isless_iu 170874197
isrationalzero 279326226
lexcmp 73964
lexcmp_s_matvec 21
lexcmp_scal_matvec 224
lexcmp_scal_vecsmall 28
lexcmp_similar 27882
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 722
listinsert 35014
listkill 7
listpop 21910
listpop0 35
listput 750827
listput0 700049
listsort 21
map_proto_G 182
map_proto_lG 3594209
map_proto_lGL 126
mat_test 98
matsize 112
minval 224
mklistcopy 49
normalize 5471459
normalizepol 93571
normalizepol_approx 665
normalizepol_lg 169352111
padic_to_Fl 77
padic_to_Fp 56
padicaff0 0
polequal 339561
polidentical 763356
qtop 14
quadtofp 112
ratval 57995
rfrac_to_ser 133
roughtype 148257
serequal 294
seridentical 14
sizedigit 7
u_lval 7540287
u_lvalrem 9875316
u_lvalrem_stop 413215757
u_pval 1036
u_pvalrem 376089
vecequal 609032
vecidentical 3649380
vecindexmax 5702
vecindexmin 5492
vecmax 1608
vecmax0 1748
vecmin 5464
vecmin0 5534
z_lval 156993
z_lvalrem 0
z_pval 2079
z_pvalrem 0

Generated by: LCOV version 1.11