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

Generated by: LCOV version 1.16