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 to exceed 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.16.1 lcov report (development 28880-3b5364847c) Lines: 1577 1772 89.0 %
Date: 2023-12-01 07:53:15 Functions: 149 158 94.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
ZV_lval 0
ZV_lvalrem 0
croak 0
gmaxgs 0
gmings 0
gtranslength 0
is_negative 0
normalizepol_approx 0
padicaff0 0
listcreate_gp 7
listkill 7
sizedigit 7
ctop 14
seridentical 14
lexcmp_s_matvec 21
listsort 21
gmequal_try 28
qtop 28
lexcmp_scal_vecsmall 42
lexcmp_vecsmall_mat 42
lexcmpgs 42
mkmap 49
listpop0 56
mklistcopy 56
closure_identical 70
gtolong 77
intdvd 91
lexcmp_vec_mat 98
gcvtop 126
map_proto_lGL 126
lexcmp_vecsmall_vec 154
cmpgen 161
chk_true_err 189
lexcmp_vecsmall_other 196
matsize 203
quadtofp 252
minval 336
lexcmpsg 343
list_cmp 343
lexcmp_scal_matvec 357
cvstop2 399
z_pvalrem 399
serequal 413
ZV_Z_dvd 434
map_proto_G 462
cmp_str 588
ZX_lvalrem 721
identicalrr 1505
col_test 2387
gpvaluation 3808
padic_to_Fp 4466
gen_z_divides 4886
gtolist 5524
mklist 6296
mklist_typ 6352
gen_Z_divides 6592
gen_pvalrem_DC 11441
gmin 12173
mat_test 16268
vecmin 20555
listpop 21917
zx_lval 28924
ZV_pval 32426
cx_approx_equal 32950
listinsert 35014
listinsert0 35028
gequalsg 41650
cmprfrac 49915
vecmax 66052
gmax 78141
z_lvalrem 87336
gpexponent 89536
gaffsg 92890
vecmin0 132632
u_pval 135474
vecindexmin 167289
padic_to_Fl 217436
vecmax0 225995
frac_val 291090
lexcmp_similar 371979
cvtop 385838
frac_lval 433991
cmpifrac 435395
vecindexmax 507618
ZX_pval 510404
gen_pval 542830
gcmpsg 580872
gaffect 660497
listput0 705208
ZX_lval 745830
listput 756371
gen_2val 772383
ensure_nb 791217
gvaluation 1162103
gen_lval 1278310
r_approx0 1305709
z_pval 1306550
gequalX 1483106
lexcmp 1616067
lexcmp_i 1616067
z_lval 1809309
cx_approx0 1825010
factorial_lval 2021544
Z_pvalrem_DC 2107705
_domul 2197700
u_pvalrem 2387228
gassoc_proto 2405753
gequal_try 3193082
roughtype 3232477
polidentical 3432098
ZX_pvalrem 3819578
Q_lvalrem 3894236
Q_pvalrem 3895928
ZV_pvalrem 3915731
Q_pval 4016492
Q_lval 4020657
cmpfrac 4386113
gen_2valrem 4739550
glength 5106000
vecidentical 5242534
vecequal 5536717
itop2_coprime 6813826
cvtop2 6820597
polequal 7422826
gen_lvalrem 7723525
gen_pvalrem 7735414
cgetp 12416896
Z_pval 13276575
normalizeser 13292431
is_monomial_test 14612756
Z_lval 21763244
isless_iu 22509377
u_lval 28108321
Z_pvalrem 30494659
Z_lvalrem 38095630
map_proto_lG 38752595
cmp_universal_rec 39035912
gabs 48846860
normalizepol 59484144
gidentical 61823604
gisexactzero 63386198
gsigne 72918773
u_lvalrem 73549801
gequalm1 74216246
cmp_universal 84040316
gneg_i 113871273
Z_lvalrem_stop 157832696
gequal 226187656
u_lvalrem_stop 272898599
gcmp 282978710
gequal1 307153188
isexactzero 361214405
gneg 415637320
isrationalzero 455896726
gexpo 534919622
gexpo_safe 535157321
normalizepol_lg 606598666
gequal0 1995062568

Generated by: LCOV version 1.14