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 29806-4d001396c7) Lines: 605 765 79.1 %
Date: 2024-12-21 09:08:57 Functions: 219 285 76.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 4296678904
Fl_addmul_pre 7459016293
Fl_addmulmul_pre 55917509
Fl_center 4023555
Fl_div 33059177
Fl_double 448575216
Fl_ellj_pre 223494
Fl_halve 16964994
Fl_mul 2366356483
Fl_mul_pre 3930773784
Fl_neg 705897110
Fl_sqr 92045990
Fl_sqr_pre 2052965347
Fl_sub 7186581040
Fl_triple 89709055
Mod16 277446
Mod2 2024379
Mod32 199255
Mod4 44558479
Mod64 0
Mod8 2070075
abscmpiu 35707902
abscmpui 35707960
absequaliu 41840044
absequalui 43588472
absi 2056076465
absi_shallow 61378411
absr 140
absrnz_equal1 4507803
absrnz_equal2n 1276397
addii 12103283349
addiiz 0
addir 474052192
addirz 0
addis 179625369
addiu 97818162
addri 1102260
addriz 0
addrr 2850862689
addrrz 1307127
addrs 12130284
addsi 304806575
addsiz 0
addsrz 0
addss 25067
addssz 0
addui 101294698
adduu 3387293723
affectsign 0
affectsign_safe 10518063
affii 924078567
affiz 282555
affrr_fixlg 55168826
affsi 6167928
affsr 489311933
affsz 0
affui 45447944
affur 13418218
ceildivuu 3718202
cgetg 24008083282
cgetg_block 372688
cgetg_copy 1294119234
cgeti 26097588385
cgetineg 263732765
cgetipos 16003675969
cgetr 1835882320
cgetr_block 42523
cmpir 9236481
cmpis 4091535
cmpiu 9666204
cmpri 282127
cmprs 40996
cmpsi 4322669
cmpsr 814592
cmpss 1300662
cmpui 9666252
cmpuu 1432318969
divii 14001856
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 16551362
dvdiiz 3246
dvdis 33569
dvdisz 0
dvdiu 576530
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdiiz 0
dvmdis 0
dvmdisz 0
dvmdsBIL 6980563226
dvmdsi 0
dvmdsiz 0
dvmdss 0
dvmdssz 0
dvmduBIL 166288284
equalis 1103786
equaliu 2948864
equalsi 1103967
equalui 2948871
evalexpo 13102665270
evallg 92413290576
evalprecp 44639407
evalvalp 78779981
evalvalser 21442008
expi 2127792220
expu 781759070
fixlg 102930711
fractor 7374795
gc_NULL 6958929
gc_bool 48391863
gc_const 14576606458
gc_double 179876305
gc_int 2567029
gc_long 239796436
gc_stoi 150960
gc_ulong 36252537
gc_utoi 469253
gc_utoipos 1119784
get_avma 0
icopy 8855702002
icopyspec 115276340
int_bit 21605880
itor 705407786
itos 455583930
itos_or_0 24006703
itou 174776633
itou_or_0 2995326
leafcopy 4907789709
lg2prec 797992920
maxdd 3123553
maxss 9543821006
maxuu 4749329
mindd 254899
minss 1687266160
minuu 76211101
mod16 236392
mod2 60274631
mod2BIL 100820247
mod32 259
mod4 4674211
mod64 0
mod8 12904696
modis 19602559
modisz 0
modsi 45222622
modsiz 0
modss 0
modssz 0
mpabs 2126339701
mpabs_shallow 13431858
mpadd 570311641
mpaddz 0
mpaff 674453
mpceil 0
mpcmp 2141121
mpcopy 707
mpdiv 665059
mpexpo 38569888
mpfloor 0
mpmul 832045611
mpmulz 0
mpneg 897932139
mpodd 112560020
mpround 1215575
mpshift 152884664
mpsqr 90062060
mpsub 250210985
mpsubz 0
mptrunc 49
muliiz 0
mulirz 0
mulis 463843308
muliu 354691318
mulri 37872684
mulriz 0
mulrrz 192514
mulrs 7181596
mulru 2766389
mulsiz 0
mulsrz 0
mulssz 0
nbits2lg 2355922572
negi 619855557
negr 3508929
new_chunk 90247954871
rcopy 892408053
rdivii 13001651
rdiviiz 13046766
rdivis 0
rdivsi 0
rdivss 839647
real2n 1058367
real_0 1064962
real_0_bit 473948554
real_1 130091092
real_1_bit 4674599
real_m1 455
real_m2n 126
remii 2533556798
remiiz 0
remis 0
remisz 0
remlll_pre 74931641
remsi 0
remsiz 0
remss 0
remssz 0
rtor 296467619
sdivsi 102149
sdivsi_rem 51424786
sdivss_rem 0
set_avma 124621072707
setabssign 2192542652
shift_left 7378489015
shift_right 5593950663
shiftl 0
shiftlr 0
shiftr 177548810
shiftr_inplace 475068637
smodis 21139673
smodss 12445483
stack_calloc 109142
stack_calloc_align 3318
stack_malloc 46110596
stack_malloc_align 54706300
stackdummy 3446718585
stoi 734571740
stor 489612912
subii 7509809661
subiiz 28
subir 3003829
subirz 0
subis 170943
subisz 0
subiu 128807481
subri 5989177
subriz 0
subrr 988575728
subrrz 1296706
subrs 16281237
subrsz 0
subsi 5894921
subsiz 0
subsrz 0
subss 25067
subssz 0
subui 132979614
subuu 25067
togglesign 1915340455
togglesign_safe 124572182
truedivii 46004470
truedivis 249245
truedivsi 6201919
uabsdiviu_rem 11892741
uabsdivui_rem 15833
udivuu_rem 158853294
ugcdiu 211406
ugcdui 2737
umodi2n 49129801
umodsu 720702253
umodui 1289578
umuluu_le 5630478
umuluu_or_0 5506996
utoi 11641065535
utoineg 262877191
utoipos 13890046020
utor 13418107
uutoi 8625072646
uutoineg 319161
vali 184165473
varncmp 163729878
varnmax 203
varnmin 0

Generated by: LCOV version 1.16