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 30532-0c728fd268) Lines: 605 680 89.0 %
Date: 2025-10-23 09:22:47 Functions: 214 238 89.9 %
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 665
ugcdui 2737
thuemorseu 2851
stack_calloc_align 3307
varnmin 15547
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33912
cmprs 40996
cgetr_block 43660
sdivsi 102148
stack_calloc 110592
gc_stoi 155881
dvdui 167195
subis 170993
mod16 241352
Fl_ellj_pre 242625
truedivis 266808
mindd 270161
cmpri 282310
Mod32 311108
uutoineg 355476
Mod16 389733
cgetg_block 393704
gc_utoi 468607
dvdiu 576573
mpdiv 667717
cmpsr 795883
rdivss 839647
real2n 1067404
addri 1109328
gc_utoipos 1153844
real_0 1156149
equalis 1181664
equalsi 1181846
mpround 1216552
absrnz_equal2n 1291375
umodui 1296416
cmpss 1427033
Mod8 2075129
mpcmp 2227513
udivuu_rem 2416391
Mod2 2479841
gc_int 2574287
mulru 2765822
subir 3006694
equaliu 3018671
equalui 3018672
itou_or_0 3041662
maxdd 3176124
cmpis 3633658
negr 3670290
ceildivuu 3844741
cmpsi 3865630
Fl_center 4485522
absrnz_equal1 4518027
mod4 4700743
real_1_bit 4706034
maxuu 4804950
umuluu_or_0 5536464
umuluu_le 5803235
subsi 6117314
subri 6124711
truedivsi 6202031
affsi 6383379
mulrs 7181596
fractor 7376011
gc_NULL 7969388
cmpir 9424607
ugcdiu 10082445
cmpiu 10120527
cmpui 10120564
affectsign_safe 10736051
uabsdiviu_rem 11892741
addrs 12303192
smodss 12553110
rdivii 13098215
rdiviiz 13143072
mod8 13273229
mpabs_shallow 13428463
utor 13462540
affur 13462645
divii 14057667
subrs 16475101
dvdii 16550162
Fl_halve 18017785
modis 19638526
smodis 21176263
evalvalser 21443044
int_bit 22286791
hammingu 24045862
abscmpiu 32369610
abscmpui 32369654
mulri 38032980
mpexpo 38854042
absequaliu 39663191
absequalui 41412083
itos_or_0 43595334
Mod4 44369891
modsi 45225533
affui 45473823
Fl_div 46504574
stack_malloc 46641591
truedivii 46806204
umodi2n 49625445
sdivsi_rem 51429861
gc_bool 51993204
gc_ulong 52141962
stack_malloc_align 55488267
affrr_fixlg 55830185
absi_shallow 57425542
Fl_addmulmul_pre 60098857
mod2 61153577
minuu 69095831
remlll_pre 75469022
evalprecp 78667784
evalvalp 81624934
mpsqr 90968659
Fl_sqr 94841570
addiu 95176878
Fl_triple 95576117
addui 98826652
mod2BIL 103363775
fixlg 105327750
mpodd 115082933
icopyspec 117027031
togglesign_safe 125528835
real_1 131267625
subiu 131676204
subui 136369784
mpshift 153179951
dvmduBIL 165809649
itou 177092429
shiftr 181114273
addis 181800454
gc_double 184338488
vali 190340685
varncmp 217203643
gc_long 241812857
mpsub 251495710
utoineg 294171276
cgetineg 295028756
rtor 300596070
addsi 306983910
muliu 373451213
itos 461714767
mulis 463128724
Fl_double 474236306
shiftr_inplace 478408646
real_0_bit 478777179
addir 479840049
affsr 495483208
stor 495788235
mpadd 574051281
negi 637372740
itor 713125113
Fl_neg 716534008
umodsu 724140570
stoi 772879270
expu 787268762
lg2prec 807412542
mpmul 837147503
rcopy 905827629
affii 909182494
mpneg 917784777
subrr 1001245288
cgetg_copy 1479715798
cmpuu 1492982952
cgetr 1857227088
togglesign 1914410493
minss 2009095503
absi 2060217722
mpabs 2130975605
Fl_sqr_pre 2161647767
setabssign 2197655619
nbits2lg 2381181014
Fl_mul 2413427910
expi 2453921142
addrr 2881939506
remii 3012196951
adduu 3410512937
stackdummy 3639185202
Fl_mul_pre 4085172860
Fl_add 4356122578
leafcopy 4968467738
shift_right 5670154530
dvmdsBIL 7089616110
Fl_sub 7288537115
Fl_addmul_pre 7654725602
subii 7665471940
shift_left 7757588557
uutoi 8807398190
icopy 9057988108
maxss 9720409335
utoi 11894567657
addii 12406970965
evalexpo 13268370100
utoipos 14139161220
gc_const 15517673816
cgetipos 16302040747
cgetg 24652061411
cgeti 27132858526
new_chunk 93444742041
evallg 95480240941
set_avma 129300521639

Generated by: LCOV version 1.16