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-09 09:19:30 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 42598
sdivsi 102150
stack_calloc 109147
gc_stoi 150795
dvdui 167195
subis 170867
Mod32 199255
Fl_ellj_pre 224654
mod16 236238
truedivis 248461
mindd 257519
Mod16 277446
cmpri 282261
uutoineg 355873
cgetg_block 387393
gc_utoi 468568
dvdiu 576452
mpdiv 664960
cmpsr 824645
rdivss 839647
real2n 1060213
real_0 1064264
equalis 1096881
equalsi 1097064
addri 1101850
gc_utoipos 1123595
mpround 1216527
absrnz_equal2n 1288114
umodui 1296213
cmpss 1314830
Mod2 2024379
Mod8 2070299
mpcmp 2140798
gc_int 2570059
mulru 2765822
equaliu 2955352
equalui 2955353
itou_or_0 2995432
subir 3003813
maxdd 3125862
negr 3517865
cmpis 3632758
ceildivuu 3723921
cmpsi 3864708
Fl_center 4023609
absrnz_equal1 4515300
mod4 4675667
real_1_bit 4699028
maxuu 4749039
umuluu_or_0 5505017
umuluu_le 5800680
subsi 5886202
subri 6040085
truedivsi 6202031
affsi 6263284
mulrs 7181596
fractor 7374998
gc_NULL 7639473
cmpir 9230488
cmpui 9654996
cmpiu 9655120
ugcdiu 9980574
affectsign_safe 10722182
uabsdiviu_rem 11892741
addrs 12157097
smodss 12542200
mod8 12871407
rdivii 13095319
rdiviiz 13137974
mpabs_shallow 13428449
utor 13439022
affur 13439126
divii 14022374
dvdii 16004224
subrs 16314348
Fl_halve 17019411
modis 19602559
int_bit 21046311
smodis 21140226
evalvalser 21442638
itos_or_0 24020535
abscmpiu 31036627
abscmpui 31036685
gc_ulong 36279694
mulri 37886133
mpexpo 38548287
absequaliu 39567124
absequalui 41316024
Mod4 43883003
modsi 45222829
affui 45472040
stack_malloc 45914621
truedivii 45989221
Fl_div 46378528
umodi2n 48454353
gc_bool 50765253
sdivsi_rem 51427158
stack_malloc_align 54709600
affrr_fixlg 55446208
Fl_addmulmul_pre 55845989
absi_shallow 57591979
mod2 60388031
minuu 66295468
remlll_pre 75198130
evalprecp 78668633
evalvalp 81625159
Fl_triple 89924478
mpsqr 90146594
Fl_sqr 92090517
addiu 93819892
addui 97318646
mod2BIL 100962016
fixlg 103287617
mpodd 114058525
icopyspec 115826621
togglesign_safe 124476919
subiu 128772246
real_1 130445766
subui 132941138
mpshift 153126845
udivuu_rem 158896721
dvmduBIL 165154019
itou 170790514
shiftr 178482768
addis 180521060
gc_double 180658097
vali 186127948
varncmp 216726796
gc_long 238081564
mpsub 250449955
utoineg 262989114
cgetineg 263842939
rtor 298050483
addsi 305702943
muliu 370537548
Fl_double 453261175
itos 455588859
mulis 463752745
addir 474967967
real_0_bit 475211443
shiftr_inplace 476657099
affsr 492378245
stor 492675748
mpadd 570706397
negi 634226380
Fl_neg 707024663
itor 707889401
umodsu 721113163
stoi 743967039
expu 778498106
lg2prec 802212913
mpmul 832717062
rcopy 893740099
affii 908495791
mpneg 912384740
subrr 992437686
cmpuu 1434995069
cgetg_copy 1456029291
cgetr 1844049210
togglesign 1908025936
minss 2004286542
absi 2052056736
Fl_sqr_pre 2108418969
mpabs 2122411676
setabssign 2188539663
nbits2lg 2364857629
Fl_mul 2376536329
expi 2426187458
addrr 2855746509
remii 2986494827
adduu 3394349495
stackdummy 3598613804
Fl_mul_pre 3963871293
Fl_add 4310673686
leafcopy 4918172524
shift_right 5621857136
dvmdsBIL 7016266342
Fl_sub 7197321315
Fl_addmul_pre 7581416644
subii 7604863402
shift_left 7694661567
uutoi 8767088858
icopy 9038473395
maxss 9522557047
utoi 11810020088
addii 12317163399
evalexpo 13163108953
utoipos 14128014432
gc_const 15427102201
cgetipos 16297563099
cgetg 24271163426
cgeti 27046288268
new_chunk 92715496657
evallg 94667142699
set_avma 128120965733

Generated by: LCOV version 1.16