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-04 09:19:51 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 43467
sdivsi 102151
stack_calloc 109178
gc_stoi 150804
dvdui 167195
subis 170898
Mod32 199255
Fl_ellj_pre 224691
mod16 236292
truedivis 248428
mindd 258483
Mod16 277446
cmpri 282261
uutoineg 356117
cgetg_block 388401
gc_utoi 468542
dvdiu 576465
mpdiv 664770
cmpsr 824653
rdivss 839647
real2n 1060268
real_0 1064263
equalis 1096787
equalsi 1096970
addri 1103710
gc_utoipos 1123721
mpround 1216525
absrnz_equal2n 1288484
umodui 1296248
cmpss 1311702
Mod2 2024379
Mod8 2070299
mpcmp 2142267
gc_int 2570779
mulru 2765822
equaliu 2955535
equalui 2955538
itou_or_0 2996089
subir 3003676
maxdd 3142639
negr 3573701
cmpis 3632706
ceildivuu 3727295
cmpsi 3864659
Fl_center 4023600
absrnz_equal1 4515350
mod4 4675841
real_1_bit 4699322
maxuu 4804755
umuluu_or_0 5503196
umuluu_le 5800680
subsi 5913102
subri 6052276
truedivsi 6202031
affsi 6281350
mulrs 7181596
fractor 7375219
gc_NULL 7725917
cmpir 9231102
cmpui 9655487
cmpiu 9655572
ugcdiu 9981213
affectsign_safe 10724619
uabsdiviu_rem 11892741
addrs 12157666
smodss 12635395
mod8 12894484
rdivii 13096675
rdiviiz 13142472
mpabs_shallow 13428463
utor 13440129
affur 13440238
divii 14025013
dvdii 16026883
subrs 16315109
Fl_halve 16995112
modis 19602559
smodis 21140226
int_bit 21216748
evalvalser 21443016
itos_or_0 24048328
abscmpui 31305648
abscmpiu 31305765
gc_ulong 36239881
mulri 37886277
mpexpo 38548870
absequaliu 39567167
absequalui 41316066
Mod4 43903853
modsi 45222893
affui 45472039
stack_malloc 45918076
truedivii 46007124
Fl_div 46335983
umodi2n 48475356
gc_bool 50785568
sdivsi_rem 51427220
stack_malloc_align 54712921
affrr_fixlg 55500396
Fl_addmulmul_pre 55942842
absi_shallow 57874460
mod2 60406929
minuu 66622837
remlll_pre 75034115
evalprecp 78666556
evalvalp 81623290
mpsqr 90149537
Fl_triple 90568418
Fl_sqr 92122102
addiu 94372609
addui 97871682
mod2BIL 100940227
fixlg 103354659
mpodd 114067119
icopyspec 115847139
togglesign_safe 124512441
subiu 128844404
real_1 130541196
subui 133017113
mpshift 153076808
udivuu_rem 158896847
dvmduBIL 165087009
itou 170802493
shiftr 178739351
addis 180564554
gc_double 180671840
vali 186105167
varncmp 216727338
gc_long 238107067
mpsub 250518726
utoineg 263286557
cgetineg 264140729
rtor 298453307
addsi 305748626
muliu 371081232
Fl_double 454427011
itos 455829696
mulis 463764886
real_0_bit 475340355
addir 475567409
shiftr_inplace 476651434
affsr 492965028
stor 493253324
mpadd 570812320
negi 635123313
Fl_neg 707153827
itor 707948678
umodsu 721095521
stoi 744314743
expu 779300605
lg2prec 802609170
mpmul 832861455
rcopy 894977471
affii 908540258
mpneg 913344732
subrr 993230502
cmpuu 1434866965
cgetg_copy 1456347135
cgetr 1845387822
togglesign 1909418200
minss 2003945131
absi 2052698772
Fl_sqr_pre 2105137540
mpabs 2123078357
setabssign 2189210225
nbits2lg 2365835439
Fl_mul 2376357885
expi 2428976890
addrr 2856075345
remii 2986728508
adduu 3395554317
stackdummy 3598551532
Fl_mul_pre 3955923141
Fl_add 4312506850
leafcopy 4921710837
shift_right 5624447876
dvmdsBIL 7020618732
Fl_sub 7196003414
Fl_addmul_pre 7570008530
subii 7617218992
shift_left 7699618518
uutoi 8767656960
icopy 9039752289
maxss 9515252855
utoi 11813864704
addii 12321780071
evalexpo 13165544812
utoipos 14133634159
gc_const 15431690304
cgetipos 16300237686
cgetg 24280508835
cgeti 27048442291
new_chunk 92750925602
evallg 94681698725
set_avma 128150840159

Generated by: LCOV version 1.16