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.1 lcov report (development 29877-9124a6ce27) Lines: 605 765 79.1 %
Date: 2025-01-18 09:08:44 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 126
absr 140
varnmax 203
mod32 259
dvdsi 371
real_m1 455
divrrz 501
mpcopy 707
dvdiiz 1325
ugcdui 2737
stack_calloc_align 3312
uabsdivui_rem 15833
addss 25067
subss 25067
subuu 25067
dvdis 33569
cmprs 40996
cgetr_block 42534
sdivsi 102150
stack_calloc 109235
gc_stoi 150916
dvdui 167195
subis 170945
mulrrz 192514
Mod32 199255
ugcdiu 211271
Fl_ellj_pre 223478
mod16 236392
truedivis 248864
mindd 254920
Mod16 277446
cmpri 282127
affiz 282555
uutoineg 319007
cgetg_block 380895
gc_utoi 468358
dvdiu 576542
mpdiv 665389
mpaff 674453
cmpsr 814587
rdivss 839647
real2n 1059849
real_0 1065162
equalis 1102541
addri 1102629
equalsi 1102723
gc_utoipos 1122868
mpround 1215573
absrnz_equal2n 1276809
umodui 1293038
subrrz 1296706
cmpss 1300662
addrrz 1307127
Mod2 2024379
Mod8 2070075
mpcmp 2141484
gc_int 2574024
mulru 2766389
equaliu 2948895
equalui 2948895
itou_or_0 2995311
subir 3003911
maxdd 3129671
negr 3509504
cmpis 3662069
ceildivuu 3715226
cmpsi 3893420
Fl_center 4023899
absrnz_equal1 4508186
mod4 4674869
real_1_bit 4680295
maxuu 4749353
umuluu_or_0 5507180
umuluu_le 5630478
subsi 5894852
subri 6012123
affsi 6173351
truedivsi 6202031
mulrs 7181596
gc_NULL 7319438
fractor 7374782
cmpir 9221422
cmpiu 9659218
cmpui 9659249
affectsign_safe 10651483
uabsdiviu_rem 11892741
addrs 12130535
smodss 12436943
mod8 12904540
rdivii 13004082
rdiviiz 13048737
utor 13421194
affur 13421302
mpabs_shallow 13431858
divii 14011237
dvdii 16115761
subrs 16288206
Fl_halve 16982870
modis 19602559
smodis 21139779
int_bit 21390851
evalvalser 21442162
itos_or_0 24010559
Fl_div 33134944
abscmpiu 33660577
abscmpui 33660734
gc_ulong 36222917
mulri 37872856
mpexpo 38557508
absequaliu 39797558
absequalui 41546222
evalprecp 44638618
Mod4 44724718
modsi 45222585
affui 45448525
stack_malloc 45919528
truedivii 46010948
gc_bool 48031680
umodi2n 49295818
sdivsi_rem 51424862
stack_malloc_align 54717138
affrr_fixlg 55177447
Fl_addmulmul_pre 55864165
absi_shallow 59347700
mod2 60494470
minuu 66387734
remlll_pre 74946954
evalvalp 78778028
Fl_triple 89999036
mpsqr 90149982
Fl_sqr 92108249
addiu 98080670
mod2BIL 101085706
addui 101552833
fixlg 102976235
mpodd 113358745
icopyspec 115486446
togglesign_safe 124568711
subiu 128437672
real_1 130148217
subui 132610048
mpshift 152972817
udivuu_rem 158853308
varncmp 163668780
dvmduBIL 166069921
itou 171665471
shiftr 177609951
addis 180196754
gc_double 180685617
vali 184508848
gc_long 238716491
mpsub 250386579
utoineg 263236039
cgetineg 264095282
rtor 296680165
addsi 305377651
muliu 369181690
Fl_double 452392010
itos 455495871
mulis 463743648
real_0_bit 473301749
addir 474260706
shiftr_inplace 475449985
affsr 489341518
stor 489699973
mpadd 568947145
negi 619195042
Fl_neg 706392375
itor 706538613
umodsu 720714799
stoi 734973948
expu 772742678
lg2prec 798141731
mpmul 830869105
rcopy 893151480
mpneg 897308980
affii 924155931
subrr 989564526
cgetg_copy 1289670634
cmpuu 1432987727
minss 1671689503
cgetr 1837371299
togglesign 1915660713
absi 2055809849
Fl_sqr_pre 2096810108
mpabs 2126142148
expi 2130719986
setabssign 2192192232
nbits2lg 2355560244
Fl_mul 2370647479
remii 2530859298
addrr 2851099629
adduu 3388606157
stackdummy 3437548263
Fl_mul_pre 3936965514
Fl_add 4297841164
leafcopy 4906672696
shift_right 5602980519
dvmdsBIL 6984001798
Fl_sub 7196933239
shift_left 7380026210
Fl_addmul_pre 7455999100
subii 7502221766
uutoi 8610322907
icopy 8851329465
maxss 9523894144
utoi 11634409883
addii 12099551605
evalexpo 13107516865
utoipos 13876296528
gc_const 14565764684
cgetipos 15980620936
cgetg 23980114631
cgeti 26057263235
new_chunk 90174416236
evallg 92321584165
set_avma 124503531430

Generated by: LCOV version 1.16