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 30316-0578a48613) Lines: 588 663 88.7 %
Date: 2025-06-01 09:19:36 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 43483
sdivsi 102149
stack_calloc 109148
gc_stoi 150803
dvdui 167195
subis 170897
Mod32 199255
Fl_ellj_pre 224661
mod16 236294
truedivis 248426
mindd 258486
Mod16 277446
cmpri 282261
uutoineg 355923
cgetg_block 388408
gc_utoi 468604
dvdiu 576464
mpdiv 664780
cmpsr 824652
rdivss 839647
real2n 1060259
real_0 1064275
equalis 1096815
equalsi 1096998
addri 1103797
gc_utoipos 1123714
mpround 1216541
absrnz_equal2n 1288520
umodui 1296248
cmpss 1311702
Mod2 2024379
Mod8 2070299
mpcmp 2142280
gc_int 2570764
mulru 2765822
equaliu 2955553
equalui 2955554
itou_or_0 2996092
subir 3003679
maxdd 3142766
negr 3573608
cmpis 3632769
ceildivuu 3727340
cmpsi 3864720
Fl_center 4023600
absrnz_equal1 4515400
mod4 4675845
real_1_bit 4699194
maxuu 4804669
umuluu_or_0 5505177
umuluu_le 5800680
subsi 5913157
subri 6041098
truedivsi 6202031
affsi 6281083
mulrs 7181596
fractor 7375220
gc_NULL 7724929
cmpir 9229630
cmpui 9655753
cmpiu 9655868
ugcdiu 9980703
affectsign_safe 10724320
uabsdiviu_rem 11892741
addrs 12157803
smodss 12564002
mod8 12894608
rdivii 13097738
rdiviiz 13143137
mpabs_shallow 13428463
utor 13440122
affur 13440246
divii 14025786
dvdii 16021081
subrs 16315164
Fl_halve 17001846
modis 19602559
smodis 21140226
int_bit 21203632
evalvalser 21443016
itos_or_0 24049029
abscmpui 31586485
abscmpiu 31586610
gc_ulong 36262328
mulri 37886424
mpexpo 38548986
absequaliu 39567119
absequalui 41316340
Mod4 43902491
modsi 45222859
affui 45472040
stack_malloc 45917898
truedivii 45995987
Fl_div 46305183
umodi2n 48473791
gc_bool 50780413
sdivsi_rem 51427188
stack_malloc_align 54710801
affrr_fixlg 55501411
Fl_addmulmul_pre 55946820
absi_shallow 58155490
mod2 60407291
minuu 66493395
remlll_pre 74995176
evalprecp 78665199
evalvalp 81621993
mpsqr 90144644
Fl_triple 90603247
Fl_sqr 92132328
addiu 94935047
addui 98434150
mod2BIL 100938626
fixlg 103355625
mpodd 114067946
icopyspec 115846965
togglesign_safe 124499935
subiu 128848356
real_1 130535271
subui 133021081
mpshift 153075432
udivuu_rem 158896847
dvmduBIL 165050730
itou 170802842
shiftr 178736555
addis 180557655
gc_double 180638766
vali 186105629
varncmp 216727735
gc_long 238106897
mpsub 250463720
utoineg 263285700
cgetineg 264139843
rtor 298458803
addsi 305740625
muliu 371028791
Fl_double 454526154
itos 455813194
mulis 463739556
real_0_bit 475096165
addir 475555750
shiftr_inplace 476711694
affsr 492965985
stor 493249290
mpadd 570543339
negi 635106266
Fl_neg 707173162
itor 707889590
umodsu 721108399
stoi 744367712
expu 779303396
lg2prec 802598407
mpmul 832545649
rcopy 894963538
affii 908590468
mpneg 913333017
subrr 993214663
cmpuu 1434875516
cgetg_copy 1456314533
cgetr 1845334803
togglesign 1909415295
minss 2003843195
absi 2052609743
Fl_sqr_pre 2105690185
mpabs 2122979263
setabssign 2189109117
nbits2lg 2365414801
Fl_mul 2376718081
expi 2428987369
addrr 2856066387
remii 2986338301
adduu 3395941996
stackdummy 3599651735
Fl_mul_pre 3955913239
Fl_add 4311385814
leafcopy 4921528634
shift_right 5624919792
dvmdsBIL 7021204229
Fl_sub 7194868206
Fl_addmul_pre 7563954916
subii 7616696741
shift_left 7699901612
uutoi 8767932858
icopy 9038970406
maxss 9514534967
utoi 11814308347
addii 12321357910
evalexpo 13166153621
utoipos 14133996174
gc_const 15431566870
cgetipos 16300564466
cgetg 24283043169
cgeti 27048425609
new_chunk 92745628059
evallg 94683200144
set_avma 128145692225

Generated by: LCOV version 1.16