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.16.2 lcov report (development 29115-f22e516b23) Lines: 1605 1765 90.9 %
Date: 2024-04-19 08:07:09 Functions: 88 90 97.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
closure_deriv 0
debug_context 0
pari_translate_string 4
compileunexport 6
compileuninline 6
L_compile_err 7
U_compile_err 7
localvars_find 7
matchQ 8
call0 21
compilelocal 28
compileexport 41
pack_localvars 53
localpush 70
str_defproto 91
closure_derivn 105
strtofunction 119
getvardyn 131
push_frame 259
compilelambda 339
countmatrixelts 399
compilestate_reset 417
compilenewptr 819
compilelvalue 1792
op_insert_loc 2926
compilemy 3175
countvar 3203
strtoclosure 3304
is_node_zero 3910
ctxmvar 9256
compilemat 9408
optimizemat 9408
closurefunc 10055
localvars_read_str 10992
compilematcoeff 12497
optimizematcoeff 13470
compileseq 14057
optimizeseq 14057
matindex_type 14569
getclosure 19286
checkdups 19493
compilefuncinline 19541
compilecall 22409
optimizecall 22416
fetch_member_raw 24773
compilestore 40906
getlvalue 44166
cattovec 45216
compilestate_restore 48451
var_push 63221
getvar 75841
access_push 107221
addcopy 249800
pari_close_compiler 315801
pari_init_compiler 318347
getentry 335827
detag 398400
strntoGENexp 843764
translate 843768
gp_closure 927034
compilestate_save 1413076
data_push 1720102
compilevec 4333790
optimizevec 4334935
vec_optimize 4427559
optimizefunc 4581816
compilefunc 4586356
getmvar 4926161
compilecast 6500197
snm_closure 8070124
genclosurectx 8073222
genclosure 8083485
genctx 8087713
frame_push 8096774
getfunction 9030624
getcodepos 9030699
first_safe_arg 9224474
getfunc 9539783
gcopyunclone 9816895
compilesmall 10863501
get_ret_type 13578775
compilecast_loc 14575187
countlisttogen 18017863
listtogen 18017863
compilenode 18169573
optimizenode 21970919
op_push 37552133
is_func_named 50405690
op_push_loc 75245982
parseproto 122172521

Generated by: LCOV version 1.14