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.18.0 lcov report (development 29732-95c6201d93) Lines: 1577 1789 88.1 %
Date: 2024-11-21 09:08:54 Functions: 148 159 93.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
ZV_lval 0
ZV_lvalrem 0
ZXV_pvalrem 0
ZXX_pvalrem 0
ZX_gen_pvalrem 0
croak 0
gmaxgs 0
gmings 0
is_negative 0
normalizepol_approx 0
padicaff0 0
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 63
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
quadtofp 252
minval 336
lexcmpsg 343
list_cmp 343
lexcmp_scal_matvec 357
cvstop2 399
z_pvalrem 399
serequal 420
map_proto_G 462
ZV_Z_dvd 616
cmp_str 672
ZX_lvalrem 721
identicalrr 1547
matsize 1862
gpvaluation 3808
gtranslength 3878
padic_to_Fp 4466
gen_z_divides 4885
gtolist 5930
gen_Z_divides 6580
mklist 6835
mklist_typ 6891
gen_pvalrem_DC 11428
gmin 12263
mat_test 16310
listpop 21917
zx_lval 28931
ZV_pval 33640
vecmin 34506
listinsert 35014
listinsert0 35028
gequalsg 43988
cx_approx_equal 53397
vecmax 66155
gmax 79310
cmprfrac 81189
z_lvalrem 87343
gpexponent 89634
gaffsg 91840
ZX_pval 97705
gen_pval 131345
u_pval 136773
vecmin0 146674
vecindexmin 181324
vecmax0 226754
frac_val 292590
col_test 294364
lexcmp_similar 371976
frac_lval 392191
padic_to_Fl 421698
cmpifrac 455541
vecindexmax 503181
cvtop 600438
gcmpsg 616442
gaffect 664578
listput0 724955
ZX_lval 748784
gen_2val 775319
listput 776125
ensure_nb 810971
gen_lval 869811
gvaluation 1166401
z_pval 1317737
gequalX 1484304
lexcmp 1616130
lexcmp_i 1616130
r_approx0 1748777
z_lval 1824375
factorial_lval 1983087
Z_pvalrem_DC 2104674
_domul 2205255
gassoc_proto 2418997
cx_approx0 2477679
u_pvalrem 2595509
gequal_try 3198025
roughtype 3232603
polidentical 3432210
ZV_pvalrem 3968833
ZX_pvalrem 4252632
cmpfrac 4588920
gen_2valrem 4801892
glength 5145627
vecidentical 5264871
vecequal 5651899
Q_lvalrem 6300199
Q_pvalrem 6301782
polequal 7684258
gen_lvalrem 8209286
gen_pvalrem 8221457
Q_pval 9336535
Q_lval 9340734
normalizeser 13403752
is_monomial_test 15238338
cgetp 16899497
itop2_coprime 17608458
cvtop2 17615614
isless_iu 21943190
map_proto_lG 37252922
cmp_universal_rec 39216320
Z_pval 47061658
Z_pvalrem 49679477
gabs 53231796
Z_lvalrem 59603953
gidentical 62038910
Z_lval 62778260
gisexactzero 63715314
u_lval 65809637
gequalm1 74232937
u_lvalrem 78017825
gsigne 79451703
cmp_universal 84947208
normalizepol 99196876
gneg_i 133307709
Z_lvalrem_stop 156143787
gequal 234105115
u_lvalrem_stop 247632925
gcmp 291115652
gequal1 328385288
isexactzero 455337578
gneg 466356863
isrationalzero 555285981
normalizepol_lg 784235791
gexpo 820707552
gexpo_safe 820953259
gequal0 2291610619

Generated by: LCOV version 1.16