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-03 09:18:42 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 43435
sdivsi 102148
stack_calloc 109174
gc_stoi 150803
dvdui 167195
subis 170897
Mod32 199255
Fl_ellj_pre 224670
mod16 236294
truedivis 248413
mindd 258483
Mod16 277446
cmpri 282261
uutoineg 356164
cgetg_block 388401
gc_utoi 468600
dvdiu 576464
mpdiv 664778
cmpsr 824646
rdivss 839647
real2n 1060270
real_0 1064257
equalis 1096822
equalsi 1097005
addri 1103798
gc_utoipos 1123680
mpround 1216525
absrnz_equal2n 1288502
umodui 1296248
cmpss 1311702
Mod2 2024379
Mod8 2070299
mpcmp 2142231
gc_int 2570717
mulru 2765822
equalui 2955534
equaliu 2955535
itou_or_0 2996093
subir 3003666
maxdd 3142692
negr 3573724
cmpis 3632723
ceildivuu 3728965
cmpsi 3864684
Fl_center 4023313
absrnz_equal1 4515397
mod4 4675844
real_1_bit 4699365
maxuu 4804467
umuluu_or_0 5517218
umuluu_le 5800680
subsi 5913083
subri 6050101
truedivsi 6202031
affsi 6281335
mulrs 7181596
fractor 7375215
gc_NULL 7724231
cmpir 9230893
cmpui 9656681
cmpiu 9656794
ugcdiu 9979959
affectsign_safe 10723680
uabsdiviu_rem 11892741
addrs 12157658
smodss 12595971
mod8 12895304
rdivii 13095954
rdiviiz 13142731
mpabs_shallow 13428463
utor 13440052
affur 13440166
divii 14025884
dvdii 16021219
subrs 16315043
Fl_halve 17008915
modis 19602559
smodis 21140226
int_bit 21170816
evalvalser 21443016
itos_or_0 24048249
abscmpui 30918345
abscmpiu 30918434
gc_ulong 36265388
mulri 37886470
mpexpo 38550197
absequaliu 39567278
absequalui 41316182
Mod4 43898889
modsi 45222835
affui 45472040
stack_malloc 45917976
truedivii 46013365
Fl_div 46306769
umodi2n 48470309
gc_bool 50778772
sdivsi_rem 51427164
stack_malloc_align 54713839
affrr_fixlg 55500304
Fl_addmulmul_pre 55946819
absi_shallow 57485955
mod2 60406837
minuu 66511313
remlll_pre 75007725
evalprecp 78662948
evalvalp 81619609
mpsqr 90152615
Fl_triple 90517978
Fl_sqr 92123933
addiu 93586538
addui 97085498
mod2BIL 100939944
fixlg 103354431
mpodd 114067414
icopyspec 115846848
togglesign_safe 124520924
subiu 128847676
real_1 130540888
subui 133020458
mpshift 153076675
udivuu_rem 158896847
dvmduBIL 162603349
itou 170802550
shiftr 178735757
addis 180571989
gc_double 180658186
vali 186104684
varncmp 216727283
gc_long 238100511
mpsub 250534172
utoineg 263287024
cgetineg 264141240
rtor 298452647
addsi 305756245
muliu 370903148
Fl_double 454053015
itos 455837421
mulis 463753333
real_0_bit 475315345
addir 475554299
shiftr_inplace 476653766
affsr 492916261
stor 493217242
mpadd 570809330
negi 635113641
Fl_neg 707070997
itor 707966398
umodsu 721135070
stoi 744398935
expu 779273654
lg2prec 802612236
mpmul 832871846
rcopy 894911125
affii 908667560
mpneg 913334596
subrr 993233722
cmpuu 1434890116
cgetg_copy 1456312568
cgetr 1845355267
togglesign 1909408285
minss 2003794616
absi 2052633447
Fl_sqr_pre 2107012670
mpabs 2123013409
setabssign 2189140170
nbits2lg 2366140102
Fl_mul 2374812087
expi 2428993462
addrr 2856095625
remii 2985550779
adduu 3394557588
stackdummy 3594441363
Fl_mul_pre 3955857237
Fl_add 4311118000
leafcopy 4920749840
shift_right 5624067969
dvmdsBIL 7020353663
Fl_sub 7179353980
Fl_addmul_pre 7566337651
subii 7616548222
shift_left 7699422649
uutoi 8764930540
icopy 9038548489
maxss 9499759661
utoi 11810587586
addii 12319133960
evalexpo 13164494726
utoipos 14130407382
gc_const 15429659453
cgetipos 16297217339
cgetg 24271879882
cgeti 27040454591
new_chunk 92724872601
evallg 94654563752
set_avma 128114164380

Generated by: LCOV version 1.16