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 - language - compile.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.0 lcov report (development 29806-4d001396c7) Lines: 1608 1779 90.4 %
Date: 2024-12-22 09:08:28 Functions: 88 91 96.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
L_compile_err 7
U_compile_err 7
access_push 112842
addcopy 262519
call0 21
cattovec 47204
checkdups 20193
closure_deriv 0
closure_derivn 105
closurefunc 10279
closuretoinl 0
compilecall 22787
compilecast 6666779
compilecast_loc 14655488
compileexport 41
compilefunc 4670615
compilefuncinline 20206
compilelambda 339
compilelocal 28
compilelvalue 1806
compilemat 9604
compilematcoeff 13134
compilemy 3294
compilenewptr 826
compilenode 18599900
compileseq 14631
compilesmall 11090860
compilestate_reset 438
compilestate_restore 49080
compilestate_save 1419273
compilestore 43972
compileunexport 6
compileuninline 6
compilevec 4462191
countlisttogen 18446753
countmatrixelts 406
countvar 3322
ctxmvar 9438
data_push 1757623
debug_context 0
detag 419792
fetch_member_raw 25137
first_safe_arg 9394014
frame_push 8011214
gcopyunclone 9768823
genclosure 7997426
genclosurectx 7986925
genctx 8001900
get_ret_type 13596609
getclosure 19951
getcodepos 8950289
getentry 353754
getfunc 9726690
getfunction 8950220
getlvalue 47442
getmvar 5027178
getvar 80825
getvardyn 131
gp_closure 932060
is_func_named 51331209
is_node_zero 3980
listtogen 18446753
localpush 70
localvars_find 7
localvars_read_str 10992
matchQ 8
matindex_type 15220
op_insert_loc 2940
op_push 38483252
op_push_loc 75778204
optimizecall 22794
optimizefunc 4665998
optimizemat 9604
optimizematcoeff 14114
optimizenode 22472196
optimizeseq 14631
optimizevec 4463378
pack_localvars 53
pari_close_compiler 325267
pari_init_compiler 326294
pari_translate_string 4
parseproto 121147422
push_frame 259
snm_closure 7985320
str_defproto 91
strntoGENexp 880087
strtoclosure 1820
strtofunction 119
translate 880091
var_push 64621
vec_optimize 4558158

Generated by: LCOV version 1.16