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 30256-57c6c2b57f) Lines: 588 663 88.7 %
Date: 2025-05-08 09:19:02 Functions: 212 236 89.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Mod64 0
affectsign 0
divsi_rem 0
divss 0
divss_rem 0
dvdiiz 0
dvdisz 0
dvdiuz 0
dvmdis 0
dvmdsi 0
dvmdss 0
get_avma 0
mod64 0
modss 0
mpceil 0
mpfloor 0
rdivis 0
rdivsi 0
remis 0
remsi 0
remss 0
sdivss_rem 0
shiftl 0
shiftlr 0
mptrunc 49
real_m2n 126
absr 140
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 708
ugcdui 2737
stack_calloc_align 3300
varnmin 15547
uabsdivui_rem 19089
addss 25067
subss 25067
subuu 25067
dvdis 33912
cmprs 40996
cgetr_block 42610
sdivsi 102150
stack_calloc 109115
gc_stoi 150796
dvdui 167195
subis 170867
Mod32 199255
Fl_ellj_pre 224672
mod16 236238
truedivis 248463
mindd 257523
Mod16 277446
cmpri 282261
uutoineg 355603
cgetg_block 387393
gc_utoi 468537
dvdiu 576453
mpdiv 664941
cmpsr 824643
rdivss 839647
real2n 1060251
real_0 1064334
equalis 1096693
equalsi 1096875
addri 1101801
gc_utoipos 1123644
mpround 1216525
absrnz_equal2n 1288112
umodui 1296213
cmpss 1314830
Mod2 2024379
Mod8 2070299
mpcmp 2140736
gc_int 2570039
mulru 2765822
equaliu 2955344
equalui 2955345
itou_or_0 2995432
subir 3003783
maxdd 3125949
negr 3517947
cmpis 3632675
ceildivuu 3724144
cmpsi 3864625
Fl_center 4023662
absrnz_equal1 4515310
mod4 4675657
real_1_bit 4699340
maxuu 4748898
umuluu_or_0 5528937
umuluu_le 5800680
subsi 5886073
subri 6018302
truedivsi 6202031
affsi 6263594
mulrs 7181596
fractor 7374997
gc_NULL 7640373
cmpir 9245630
cmpui 9654463
cmpiu 9654692
ugcdiu 9980558
affectsign_safe 10721784
uabsdiviu_rem 11892741
addrs 12157057
smodss 12563665
mod8 12870201
rdivii 13094783
rdiviiz 13137889
mpabs_shallow 13428449
utor 13439132
affur 13439232
divii 14017663
dvdii 16025772
subrs 16314536
Fl_halve 17001883
modis 19602559
int_bit 21052184
smodis 21140226
evalvalser 21442638
itos_or_0 24020484
abscmpiu 32221361
abscmpui 32221499
gc_ulong 36263615
mulri 37886120
mpexpo 38546626
absequaliu 39566793
absequalui 41315693
Mod4 43881272
modsi 45222818
affui 45472040
stack_malloc 45914471
truedivii 45967407
Fl_div 46348819
umodi2n 48452807
gc_bool 50786314
sdivsi_rem 51427146
stack_malloc_align 54708376
affrr_fixlg 55445661
Fl_addmulmul_pre 55842997
absi_shallow 58776575
mod2 60387537
minuu 66318736
remlll_pre 75182178
evalprecp 78665941
evalvalp 81622437
Fl_triple 89829788
mpsqr 90155546
Fl_sqr 92039626
addiu 96195308
addui 99693997
mod2BIL 100961015
fixlg 103287043
mpodd 114057519
icopyspec 115826372
togglesign_safe 124468716
subiu 128774151
real_1 130431762
subui 132942993
mpshift 153130807
udivuu_rem 158896721
dvmduBIL 165072666
itou 170791463
shiftr 178480572
addis 180547433
gc_double 180571932
vali 186127402
varncmp 216727384
gc_long 238082442
mpsub 250490051
utoineg 262984641
cgetineg 263838409
rtor 298056280
addsi 305728717
muliu 370515823
Fl_double 452804467
itos 455554818
mulis 463736959
addir 474955606
shiftr_inplace 476637376
real_0_bit 477332283
affsr 492361950
stor 492663740
mpadd 572633578
negi 634198807
Fl_neg 707073320
itor 707703987
umodsu 721103558
stoi 744007767
expu 778485848
lg2prec 802103248
mpmul 834669749
rcopy 893728554
affii 908471186
mpneg 912361457
subrr 992476839
cmpuu 1435018061
cgetg_copy 1456029382
cgetr 1843816006
togglesign 1907938673
minss 2004059485
absi 2052021921
Fl_sqr_pre 2105116548
mpabs 2122407284
setabssign 2188535641
nbits2lg 2365971348
Fl_mul 2377978441
expi 2426010531
addrr 2857536080
remii 2985892553
adduu 3396283598
stackdummy 3605018471
Fl_mul_pre 3956917551
Fl_add 4310040347
leafcopy 4918093764
shift_right 5621117557
dvmdsBIL 7015826746
Fl_sub 7216633950
Fl_addmul_pre 7572569696
subii 7605040686
shift_left 7694113711
uutoi 8767554336
icopy 9037773345
maxss 9542617302
utoi 11812920620
addii 12314585921
evalexpo 13163952396
utoipos 14130771865
gc_const 15426444438
cgetipos 16299912908
cgetg 24285829574
cgeti 27047891584
new_chunk 92733551867
evallg 94692601841
set_avma 128145998750

Generated by: LCOV version 1.16