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 - kernel/none - level1.h (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.0 lcov report (development 29712-7c8a932571) Lines: 605 765 79.1 %
Date: 2024-11-15 09:08:45 Functions: 219 285 76.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 4294671875
Fl_addmul_pre 7459644730
Fl_addmulmul_pre 55833906
Fl_center 4023649
Fl_div 33060713
Fl_double 443030407
Fl_ellj_pre 223490
Fl_halve 16987251
Fl_mul 2367627997
Fl_mul_pre 3926769387
Fl_neg 705409534
Fl_sqr 91967588
Fl_sqr_pre 2046446749
Fl_sub 7214962672
Fl_triple 88835394
Mod16 277446
Mod2 2024379
Mod32 199255
Mod4 44489201
Mod64 0
Mod8 2070075
abscmpiu 36116410
abscmpui 36116582
absequaliu 41838129
absequalui 43586894
absi 2056309266
absi_shallow 62020099
absr 140
absrnz_equal1 4482284
absrnz_equal2n 1276393
addii 12071809946
addiiz 0
addir 474033549
addirz 0
addis 179472123
addiu 98851489
addri 1102214
addriz 0
addrr 2847670203
addrrz 1307127
addrs 12105722
addsi 304639976
addsiz 0
addsrz 0
addss 25067
addssz 0
addui 102321090
adduu 3372547416
affectsign 0
affectsign_safe 10518709
affii 923443722
affiz 282611
affrr_fixlg 54971124
affsi 6167921
affsr 487712170
affsz 0
affui 45447944
affur 13417332
ceildivuu 3713951
cgetg 24018462908
cgetg_block 372702
cgetg_copy 1258453841
cgeti 25956517960
cgetineg 256952069
cgetipos 15900103472
cgetr 1833198460
cgetr_block 42519
cmpir 9383669
cmpis 4094078
cmpiu 9664806
cmpri 446371
cmprs 40996
cmpsi 4325120
cmpsr 650299
cmpss 1300284
cmpui 9664824
cmpuu 1432191802
divii 14013014
diviiz 0
divirz 0
divisz 0
divriz 0
divrrz 501
divrsz 0
divsi_rem 0
divsiz 0
divsrz 0
divss 0
divss_rem 0
divssz 0
dvdii 16543429
dvdiiz 3246
dvdis 33569
dvdisz 0
dvdiu 576538
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdiiz 0
dvmdis 0
dvmdisz 0
dvmdsBIL 6962674581
dvmdsi 0
dvmdsiz 0
dvmdss 0
dvmdssz 0
dvmduBIL 172601858
equalis 1081816
equaliu 2948482
equalsi 1081998
equalui 2948481
evalexpo 13080293627
evallg 92181297901
evalprecp 44617569
evalvalp 78723814
evalvalser 21484190
expi 2073692755
expu 779961069
fixlg 102731818
fractor 7374178
gc_NULL 6957466
gc_bool 48358931
gc_const 14557756402
gc_double 179975941
gc_int 2567034
gc_long 239779318
gc_stoi 150964
gc_ulong 36246344
gc_utoi 470670
gc_utoipos 1119777
get_avma 0
icopy 8825445104
icopyspec 115171929
int_bit 21669413
itor 705648557
itos 458197387
itos_or_0 24005835
itou 174187449
itou_or_0 2994596
leafcopy 4909531894
lg2prec 796600904
maxdd 3123452
maxss 9539748982
maxuu 4749216
mindd 254901
minss 1686237018
minuu 76226581
mod16 236390
mod2 60271682
mod2BIL 100825583
mod32 259
mod4 4673964
mod64 0
mod8 12903340
modis 19602559
modisz 0
modsi 45222658
modsiz 0
modss 0
modssz 0
mpabs 2126588768
mpabs_shallow 13431858
mpadd 568311913
mpaddz 0
mpaff 674502
mpceil 0
mpcmp 2141122
mpcopy 707
mpdiv 665073
mpexpo 38572906
mpfloor 0
mpmul 830072778
mpmulz 0
mpneg 897631724
mpodd 112556246
mpround 1215579
mpshift 152874713
mpsqr 90058439
mpsub 250230028
mpsubz 0
mptrunc 49
muliiz 0
mulirz 0
mulis 463831360
muliu 357483223
mulri 37814260
mulriz 0
mulrrz 192514
mulrs 7181596
mulru 2766389
mulsiz 0
mulsrz 0
mulssz 0
nbits2lg 2351375304
negi 619818227
negr 3506077
new_chunk 89994956012
rcopy 891674556
rdivii 13002138
rdiviiz 13046717
rdivis 0
rdivsi 0
rdivss 839647
real2n 1058367
real_0 1064893
real_0_bit 471423269
real_1 129854642
real_1_bit 4674624
real_m1 399
real_m2n 70
remii 2531110620
remiiz 0
remis 0
remisz 0
remlll_pre 75010522
remsi 0
remsiz 0
remss 0
remssz 0
rtor 295816563
sdivsi 101890
sdivsi_rem 51424823
sdivss_rem 0
set_avma 124293928005
setabssign 2192768729
shift_left 7367155425
shift_right 5587991291
shiftl 0
shiftlr 0
shiftr 177038489
shiftr_inplace 473909861
smodis 21139673
smodss 12422519
stack_calloc 109093
stack_calloc_align 3318
stack_malloc 46109232
stack_malloc_align 54709686
stackdummy 3461243079
stoi 734633886
stor 488088977
subii 7505364121
subiiz 28
subir 3003827
subirz 0
subis 170685
subisz 0
subiu 128674564
subri 6019675
subriz 0
subrr 987715008
subrrz 1296706
subrs 16257037
subrsz 0
subsi 5894586
subsiz 0
subsrz 0
subss 25067
subssz 0
subui 132843512
subuu 25067
togglesign 1905428788
togglesign_safe 124557898
truedivii 46020649
truedivis 249204
truedivsi 6201919
uabsdiviu_rem 11892741
uabsdivui_rem 15833
udivuu_rem 158834254
ugcdiu 211661
ugcdui 2737
umodi2n 49060338
umodsu 720433369
umodui 1511776
umuluu_le 5630016
umuluu_or_0 5507795
utoi 11594637932
utoineg 256096585
utoipos 13789838743
utor 13417223
uutoi 8583465611
uutoineg 319004
vali 184016429
varncmp 163687244
varnmax 203
varnmin 0

Generated by: LCOV version 1.16