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.2 lcov report (development 29115-f22e516b23) Lines: 1577 1772 89.0 %
Date: 2024-04-26 08:07:25 Functions: 149 158 94.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_lval 6337078
Q_lvalrem 3902372
Q_pval 6332918
Q_pvalrem 3904061
ZV_Z_dvd 539
ZV_lval 0
ZV_lvalrem 0
ZV_pval 32496
ZV_pvalrem 3898507
ZX_lval 745830
ZX_lvalrem 721
ZX_pval 510516
ZX_pvalrem 3824043
Z_lval 24449256
Z_lvalrem 38210841
Z_lvalrem_stop 159563799
Z_pval 13571271
Z_pvalrem 30584962
Z_pvalrem_DC 2147269
_domul 2201967
cgetp 12416918
chk_true_err 189
closure_identical 70
cmp_str 602
cmp_universal 84043191
cmp_universal_rec 39035960
cmpfrac 4386935
cmpgen 161
cmpifrac 435395
cmprfrac 81114
col_test 292411
croak 0
ctop 14
cvstop2 399
cvtop 385809
cvtop2 6821303
cx_approx0 1851190
cx_approx_equal 53397
ensure_nb 791224
factorial_lval 2021918
frac_lval 535486
frac_val 291090
gabs 49809860
gaffect 661953
gaffsg 91812
gassoc_proto 2413794
gcmp 293417305
gcmpsg 613747
gcvtop 126
gen_2val 772208
gen_2valrem 4744139
gen_Z_divides 6592
gen_lval 1278492
gen_lvalrem 7710462
gen_pval 543012
gen_pvalrem 7722557
gen_pvalrem_DC 11441
gen_z_divides 4886
gequal 232189500
gequal0 2221105011
gequal1 312298052
gequalX 1483060
gequal_try 3193345
gequalm1 74216421
gequalsg 41664
gexpo 645481270
gexpo_safe 645714775
gidentical 61840237
gisexactzero 63703446
glength 5141924
gmax 78995
gmaxgs 0
gmequal_try 28
gmin 12173
gmings 0
gneg 446991984
gneg_i 128018525
gpexponent 89599
gpvaluation 3808
gsigne 73714838
gtolist 5538
gtolong 77
gtranslength 0
gvaluation 1162848
identicalrr 1554
intdvd 91
is_monomial_test 14673044
is_negative 0
isexactzero 441585844
isless_iu 22509893
isrationalzero 537722898
itop2_coprime 6814843
lexcmp 1616052
lexcmp_i 1616056
lexcmp_s_matvec 21
lexcmp_scal_matvec 357
lexcmp_scal_vecsmall 42
lexcmp_similar 371975
lexcmp_vec_mat 98
lexcmp_vecsmall_mat 42
lexcmp_vecsmall_other 196
lexcmp_vecsmall_vec 154
lexcmpgs 42
lexcmpsg 343
list_cmp 343
listcreate_gp 7
listinsert 35014
listinsert0 35028
listkill 7
listpop 21917
listpop0 56
listput 756378
listput0 705215
listsort 21
map_proto_G 462
map_proto_lG 39180886
map_proto_lGL 126
mat_test 16268
matsize 203
minval 336
mklist 6345
mklist_typ 6401
mklistcopy 56
mkmap 49
normalizepol 95051499
normalizepol_approx 0
normalizepol_lg 752229327
normalizeser 13323801
padic_to_Fl 217436
padic_to_Fp 4466
padicaff0 0
polequal 7422885
polidentical 3432196
qtop 28
quadtofp 252
r_approx0 1323136
roughtype 3232451
serequal 413
seridentical 14
sizedigit 7
u_lval 30018904
u_lvalrem 74461437
u_lvalrem_stop 274554604
u_pval 135119
u_pvalrem 2391840
vecequal 5593071
vecidentical 5244541
vecindexmax 502349
vecindexmin 168048
vecmax 66058
vecmax0 226126
vecmin 21314
vecmin0 133391
z_lval 1809315
z_lvalrem 87350
z_pval 1306550
z_pvalrem 399
zx_lval 28924

Generated by: LCOV version 1.14