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 29712-7c8a932571) Lines: 1577 1789 88.1 %
Date: 2024-11-15 09:08:45 Functions: 148 159 93.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_lval 9340607
Q_lvalrem 6300247
Q_pval 9336404
Q_pvalrem 6301835
ZV_Z_dvd 616
ZV_lval 0
ZV_lvalrem 0
ZV_pval 33640
ZV_pvalrem 3968801
ZXV_pvalrem 0
ZXX_pvalrem 0
ZX_gen_pvalrem 0
ZX_lval 748784
ZX_lvalrem 721
ZX_pval 97705
ZX_pvalrem 4252729
Z_lval 62779123
Z_lvalrem 59603200
Z_lvalrem_stop 156055139
Z_pval 47062394
Z_pvalrem 49678680
Z_pvalrem_DC 2104580
_domul 2205255
cgetp 16899470
chk_true_err 189
closure_identical 70
cmp_str 672
cmp_universal 84945414
cmp_universal_rec 39215839
cmpfrac 4588890
cmpgen 161
cmpifrac 455541
cmprfrac 81175
col_test 294364
croak 0
ctop 14
cvstop2 399
cvtop 600440
cvtop2 17615087
cx_approx0 2477666
cx_approx_equal 53397
ensure_nb 810971
factorial_lval 1983126
frac_lval 392196
frac_val 292590
gabs 53228404
gaffect 664578
gaffsg 91840
gassoc_proto 2418990
gcmp 290888179
gcmpsg 616386
gcvtop 126
gen_2val 775319
gen_2valrem 4801934
gen_Z_divides 6580
gen_lval 869811
gen_lvalrem 8209339
gen_pval 131345
gen_pvalrem 8221530
gen_pvalrem_DC 11428
gen_z_divides 4885
gequal 234102412
gequal0 2291279229
gequal1 323227865
gequalX 1484313
gequal_try 3197997
gequalm1 74232902
gequalsg 43988
gexpo 820713201
gexpo_safe 820954269
gidentical 62038643
gisexactzero 63711757
glength 5145627
gmax 79268
gmaxgs 0
gmequal_try 28
gmin 12264
gmings 0
gneg 466120847
gneg_i 133309631
gpexponent 89634
gpvaluation 3808
gsigne 79451059
gtolist 5930
gtolong 77
gtranslength 3878
gvaluation 1166387
identicalrr 1547
intdvd 91
is_monomial_test 15237937
is_negative 0
isexactzero 455302722
isless_iu 21943507
isrationalzero 555257415
itop2_coprime 17608007
lexcmp 1616134
lexcmp_i 1616134
lexcmp_s_matvec 21
lexcmp_scal_matvec 357
lexcmp_scal_vecsmall 42
lexcmp_similar 371978
lexcmp_vec_mat 98
lexcmp_vecsmall_mat 42
lexcmp_vecsmall_other 196
lexcmp_vecsmall_vec 154
lexcmpgs 42
lexcmpsg 343
list_cmp 343
listinsert 35014
listinsert0 35028
listpop 21917
listpop0 56
listput 776125
listput0 724955
listsort 21
map_proto_G 462
map_proto_lG 36980445
map_proto_lGL 126
mat_test 16310
matsize 1862
minval 336
mklist 6835
mklist_typ 6891
mklistcopy 63
mkmap 49
normalizepol 99193678
normalizepol_approx 0
normalizepol_lg 784181886
normalizeser 13403542
padic_to_Fl 421704
padic_to_Fp 4466
padicaff0 0
polequal 7683981
polidentical 3432210
qtop 28
quadtofp 252
r_approx0 1748767
roughtype 3232611
serequal 420
seridentical 14
sizedigit 7
u_lval 65810526
u_lvalrem 78017160
u_lvalrem_stop 247618403
u_pval 136810
u_pvalrem 2595575
vecequal 5651906
vecidentical 5264780
vecindexmax 503187
vecindexmin 181324
vecmax 66163
vecmax0 226761
vecmin 34506
vecmin0 146674
z_lval 1824402
z_lvalrem 87328
z_pval 1317745
z_pvalrem 399
zx_lval 28931

Generated by: LCOV version 1.16